diff --git a/diagrams.nomad.hcl b/diagrams.nomad.hcl index 5d6b98c..ef19455 100644 --- a/diagrams.nomad.hcl +++ b/diagrams.nomad.hcl @@ -1,5 +1,5 @@ [[ $c := merge .diagrams . -]] -job [[ .instance | toJSON ]] { +job "[[ .instance ]]" { [[ template "common/job_start.tpl" $c ]] @@ -43,18 +43,18 @@ job [[ .instance | toJSON ]] { [[- if not (regexp.Match "^/?$" (urlParse $c.public_url).Path) ]] && PathPrefix(`[[ (urlParse $c.public_url).Path ]]`)[[ end ]]", "[[ $c.traefik.instance ]].http.routers.[[ .instance ]][[ .consul.suffix ]].entrypoints=[[ join $c.traefik.entrypoints "," ]]", [[- if not (regexp.Match "^/?$" (urlParse $c.public_url).Path) ]] - "[[ $c.traefik.instance ]].http.routers.[[ .instance ]][[ .consul.suffix ]].middlewares=[[ .instance ]]-prefix[[ $c.consul.suffix ]],[[ .instance ]]-headers[[ .consul.suffix ]],[[ template "common/traefik_middlewares.tpl" $c.traefik ]]", + "[[ $c.traefik.instance ]].http.routers.[[ .instance ]][[ .consul.suffix ]].middlewares=[[ .instance ]]-prefix[[ $c.consul.suffix ]],[[ .instance ]]-headers[[ .consul.suffix ]],[[ template "common/traefik_middlewares.tpl" $c ]]", [[- else ]] - "[[ $c.traefik.instance ]].http.routers.[[ .instance ]][[ .consul.suffix ]].middlewares=[[ .instance ]]-headers[[ .consul.suffix ]],[[ template "common/traefik_middlewares.tpl" $c.traefik ]]", + "[[ $c.traefik.instance ]].http.routers.[[ .instance ]][[ .consul.suffix ]].middlewares=[[ .instance ]]-headers[[ .consul.suffix ]],[[ template "common/traefik_middlewares.tpl" $c ]]", [[- end ]] ] } task "diagrams" { - driver = [[ $c.nomad.driver | toJSON ]] + driver = "[[ $c.nomad.driver ]]" config { - image = [[ $c.image | toJSON ]] + image = "[[ $c.image ]]" pids_limit = 200 readonly_rootfs = true volumes = [ @@ -82,8 +82,8 @@ _EOT destination = "local/PostConfig.js" } -[[ template "common/file_env.tpl" $c.env ]] -[[ template "common/resources.tpl" $c.resources ]] +[[ template "common/file_env.tpl" $c ]] +[[ template "common/resources.tpl" $c ]] } } } diff --git a/example/diagrams.nomad.hcl b/example/diagrams.nomad.hcl index 3022dc2..2210f59 100644 --- a/example/diagrams.nomad.hcl +++ b/example/diagrams.nomad.hcl @@ -56,7 +56,7 @@ job "diagrams" { driver = "docker" config { - image = "danielberteaud/diagrams:22.1.18-1" + image = "danielberteaud/diagrams:22.1.21-1" pids_limit = 200 readonly_rootfs = true volumes = [ @@ -102,7 +102,6 @@ _EOT destination = "local/PostConfig.js" } - # Use a template block instead of env {} so we can fetch values from vault template { data = <<_EOT diff --git a/example/images/diagrams/Dockerfile b/example/images/diagrams/Dockerfile index 0ba2dc0..478dbb4 100644 --- a/example/images/diagrams/Dockerfile +++ b/example/images/diagrams/Dockerfile @@ -1,8 +1,8 @@ -FROM danielberteaud/java:17.24.1-1 +FROM danielberteaud/java:17.24.1-2 MAINTAINER Daniel Berteaud ARG TOMCAT_VERSION=9.0.85 \ - DIAGRAMS_VERSION=22.1.18 + DIAGRAMS_VERSION=22.1.21 ENV CATALINA_HOME=/opt/tomcat \ TOMCAT_PORT=8282 \ diff --git a/images/diagrams/Dockerfile b/images/diagrams/Dockerfile index be82a39..231a475 100644 --- a/images/diagrams/Dockerfile +++ b/images/diagrams/Dockerfile @@ -2,7 +2,7 @@ FROM [[ .docker.repo ]][[ .docker.base_images.java17.image ]] MAINTAINER [[ .docker.maintainer ]] ARG TOMCAT_VERSION=9.0.85 \ - DIAGRAMS_VERSION=22.1.18 + DIAGRAMS_VERSION=22.1.21 ENV CATALINA_HOME=/opt/tomcat \ TOMCAT_PORT=8282 \ diff --git a/variables.yml b/variables.yml index 8b4d7a3..14d2f96 100644 --- a/variables.yml +++ b/variables.yml @@ -2,7 +2,7 @@ instance: diagrams diagrams: - image: '[[ .docker.repo ]]diagrams:22.1.18-1' + image: '[[ .docker.repo ]]diagrams:22.1.21-1' env: {} public_url: https://draw.example.org traefik: