这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,41 @@ updates:
open-pull-requests-limit: 2
labels:
- "type: dependencies"
- package-ecosystem: "docker"
directory: "/plugins/caddy-vhosts"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- "type: dependencies"
- package-ecosystem: "docker"
directory: "/plugins/haproxy-vhosts"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- "type: dependencies"
- package-ecosystem: "docker"
directory: "/plugins/logs"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- "type: dependencies"
- package-ecosystem: "docker"
directory: "/plugins/openresty-vhosts"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- "type: dependencies"
- package-ecosystem: "docker"
directory: "/plugins/traefik-vhosts"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- "type: dependencies"
- package-ecosystem: bundler
directory: "/tests/apps/ruby"
schedule:
Expand Down
1 change: 1 addition & 0 deletions plugins/caddy-vhosts/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM lucaslorentz/caddy-docker-proxy:2.8
2 changes: 1 addition & 1 deletion plugins/caddy-vhosts/internal-functions
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn-caddy-template-compose-file() {
}

fn-caddy-image() {
fn-plugin-property-get-default "caddy" "--global" "image" "lucaslorentz/caddy-docker-proxy:2.8"
fn-plugin-property-get-default "caddy" "--global" "image" "$(grep "FROM" "$PLUGIN_AVAILABLE_PATH/caddy-vhosts/Dockerfile" | awk '{print $2}')"
}

fn-caddy-letsencrypt-email() {
Expand Down
1 change: 1 addition & 0 deletions plugins/haproxy-vhosts/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM byjg/easy-haproxy:4.3.0
2 changes: 1 addition & 1 deletion plugins/haproxy-vhosts/internal-functions
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn-haproxy-template-compose-file() {
}

fn-haproxy-image() {
fn-plugin-property-get-default "haproxy" "--global" "image" "byjg/easy-haproxy:4.3.0"
fn-plugin-property-get-default "haproxy" "--global" "image" "$(grep "FROM" "$PLUGIN_AVAILABLE_PATH/haproxy-vhosts/Dockerfile" | awk '{print $2}')"
}

fn-haproxy-log-level() {
Expand Down
1 change: 1 addition & 0 deletions plugins/logs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM timberio/vector:0.35.X-debian
13 changes: 12 additions & 1 deletion plugins/logs/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,17 @@ func startVectorContainer(vectorImage string) error {
return nil
}

func getComputedVectorImage() string {
return common.PropertyGetDefault("logs", "--global", "vector-image", getDefaultVectorImage())
}

// getDefaultVectorImage returns the default image used for the vector container
func getDefaultVectorImage() string {
contents := strings.TrimSpace(VectorDockerfile)
parts := strings.SplitN(contents, " ", 2)
return parts[1]
}

func stopVectorContainer() error {
if !common.IsComposeInstalled() {
return errors.New("Required docker compose plugin is not installed")
Expand Down Expand Up @@ -159,7 +170,7 @@ func stopVectorContainer() error {
data := vectorTemplateData{
DokkuLibRoot: dokkuLibRoot,
DokkuLogsDir: dokkuLogsDir,
VectorImage: VectorImage,
VectorImage: getComputedVectorImage(),
}

if err := tmpl.Execute(tmpFile, data); err != nil {
Expand Down
7 changes: 5 additions & 2 deletions plugins/logs/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ var (
}
)

// VectorImage contains the default vector image to run
const VectorImage = "timberio/vector:0.35.X-debian"
// VectorDockerfile is the contents of the default Dockerfile
// containing the version of vector Dokku uses
//
//go:embed Dockerfile
var VectorDockerfile string

// VectorDefaultSink contains the default sink in use for vector log shipping
const VectorDefaultSink = "blackhole://?print_interval_secs=1"
Expand Down
2 changes: 1 addition & 1 deletion plugins/logs/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func reportGlobalMaxSize(appName string) string {
}

func reportVectorGlobalImage(appName string) string {
return common.PropertyGetDefault("logs", "--global", "vector-image", VectorImage)
return getComputedVectorImage()
}

func reportGlobalVectorSink(appName string) string {
Expand Down
2 changes: 1 addition & 1 deletion plugins/logs/subcommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func CommandVectorStart(vectorImage string) error {
}

if vectorImage == "" {
vectorImage = common.PropertyGetDefault("logs", "--global", "vector-image", VectorImage)
vectorImage = common.PropertyGetDefault("logs", "--global", "vector-image", getComputedVectorImage())
}

common.LogVerbose("Starting vector container")
Expand Down
1 change: 1 addition & 0 deletions plugins/openresty-vhosts/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM dokku/openresty-docker-proxy:0.6.0
2 changes: 1 addition & 1 deletion plugins/openresty-vhosts/internal-functions
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ fn-openresty-hsts-is-enabled() {
}

fn-openresty-image() {
fn-plugin-property-get-default "openresty" "--global" "image" "dokku/openresty-docker-proxy:0.6.0"
fn-plugin-property-get-default "openresty" "--global" "image" "$(grep "FROM" "$PLUGIN_AVAILABLE_PATH/openresty-vhosts/Dockerfile" | awk '{print $2}')"
}

fn-openresty-letsencrypt-email() {
Expand Down
1 change: 1 addition & 0 deletions plugins/traefik-vhosts/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM traefik:v2.10
2 changes: 1 addition & 1 deletion plugins/traefik-vhosts/internal-functions
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn-traefik-dashboard-enabled() {
}

fn-traefik-image() {
fn-plugin-property-get-default "traefik" "--global" "image" "traefik:v2.10"
fn-plugin-property-get-default "traefik" "--global" "image" "$(grep "FROM" "$PLUGIN_AVAILABLE_PATH/traefik-vhosts/Dockerfile" | awk '{print $2}')"
}

fn-traefik-letsencrypt-email() {
Expand Down