feat: ensure referenced images get updated by dependabot
Dokku uses a few external images for various bits of functionality, but these must be manually updated every so often due to being referenced in code. By moving the references to Dockerfiles, we can take advantage of dependabot to issue automatic PRs when they are out of date.
This commit is contained in:
35
.github/dependabot.yml
vendored
35
.github/dependabot.yml
vendored
@@ -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:
|
||||
|
||||
1
plugins/caddy-vhosts/Dockerfile
Normal file
1
plugins/caddy-vhosts/Dockerfile
Normal file
@@ -0,0 +1 @@
|
||||
FROM lucaslorentz/caddy-docker-proxy:2.8
|
||||
@@ -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() {
|
||||
|
||||
1
plugins/haproxy-vhosts/Dockerfile
Normal file
1
plugins/haproxy-vhosts/Dockerfile
Normal file
@@ -0,0 +1 @@
|
||||
FROM byjg/easy-haproxy:4.3.0
|
||||
@@ -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() {
|
||||
|
||||
1
plugins/logs/Dockerfile
Normal file
1
plugins/logs/Dockerfile
Normal file
@@ -0,0 +1 @@
|
||||
FROM timberio/vector:0.35.X-debian
|
||||
@@ -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")
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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")
|
||||
|
||||
1
plugins/openresty-vhosts/Dockerfile
Normal file
1
plugins/openresty-vhosts/Dockerfile
Normal file
@@ -0,0 +1 @@
|
||||
FROM dokku/openresty-docker-proxy:0.6.0
|
||||
@@ -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() {
|
||||
|
||||
1
plugins/traefik-vhosts/Dockerfile
Normal file
1
plugins/traefik-vhosts/Dockerfile
Normal file
@@ -0,0 +1 @@
|
||||
FROM traefik:v2.10
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user