Update to 24.3.1

Tomcat to 10.1.23. Also cleanup job file
This commit is contained in:
Daniel Berteaud 2024-04-29 09:36:35 +02:00
parent c50fabe353
commit 0600654a09
5 changed files with 46 additions and 33 deletions

View File

@ -1,9 +1,11 @@
[[ $c := merge .diagrams . -]]
job "[[ .instance ]]" {
[[ template "common/job_start.tpl" $c ]]
[[ template "common/job_start.tpl" . ]]
group "diagrams" {
[[- $c := merge .diagrams . ]]
[[ template "common/group_start" $c ]]
network {
mode = "bridge"
}
@ -18,8 +20,8 @@ job "[[ .instance ]]" {
type = "http"
path = "/health"
expose = true
interval = "1m"
timeout = "8s"
interval = "[[ $c.consul.check.interval ]]"
timeout = "[[ $c.consul.check.timeout ]]"
check_restart {
limit = 4
@ -36,9 +38,8 @@ job "[[ .instance ]]" {
driver = "[[ $c.nomad.driver ]]"
config {
image = "[[ $c.image ]]"
[[ template "common/image" $c ]]
pids_limit = 200
readonly_rootfs = true
volumes = [
"local/PreConfig.js:/opt/tomcat/webapps/draw/js/PreConfig.js",
"local/PostConfig.js:/opt/tomcat/webapps/draw/js/PostConfig.js"
@ -46,10 +47,12 @@ job "[[ .instance ]]" {
}
env {
JAVA_OPTS = "-Djava.io.tmpdir=/local"
TMPDIR = "/local/tmp"
TOMCAT_ADDRESS = "127.0.0.1"
}
[[ template "common/file_env" $c ]]
template {
data =<<_EOT
[[ template "diagrams/PreConfig.js.tpl" $c ]]
@ -64,8 +67,7 @@ _EOT
destination = "local/PostConfig.js"
}
[[ template "common/file_env.tpl" $c ]]
[[ template "common/resources.tpl" $c ]]
[[ template "common/resources" $c ]]
}
}
}

View File

@ -5,9 +5,18 @@ job "diagrams" {
region = "global"
group "diagrams" {
shutdown_delay = "6s"
ephemeral_disk {
# Use minimal ephemeral disk
size = 101
}
network {
mode = "bridge"
}
@ -45,8 +54,8 @@ job "diagrams" {
type = "http"
path = "/health"
expose = true
interval = "1m"
timeout = "8s"
interval = "30s"
timeout = "5s"
check_restart {
limit = 4
@ -69,9 +78,10 @@ job "diagrams" {
driver = "docker"
config {
image = "danielberteaud/diagrams:24.2.3-1"
pids_limit = 200
image = "danielberteaud/diagrams:24.3.1-1"
readonly_rootfs = true
pids_limit = 200
volumes = [
"local/PreConfig.js:/opt/tomcat/webapps/draw/js/PreConfig.js",
"local/PostConfig.js:/opt/tomcat/webapps/draw/js/PostConfig.js"
@ -79,10 +89,24 @@ job "diagrams" {
}
env {
JAVA_OPTS = "-Djava.io.tmpdir=/local"
TMPDIR = "/local/tmp"
TOMCAT_ADDRESS = "127.0.0.1"
}
# Use a template block instead of env {} so we can fetch values from vault
template {
data = <<_EOT
LANG=fr_FR.utf8
TZ=Europe/Paris
_EOT
destination = "secrets/.env"
perms = 400
env = true
}
template {
data = <<_EOT
window.DRAWIO_BASE_URL = 'https://draw.example.org';
@ -116,19 +140,6 @@ _EOT
}
# Use a template block instead of env {} so we can fetch values from vault
template {
data = <<_EOT
LANG=fr_FR.utf8
TZ=Europe/Paris
_EOT
destination = "secrets/.env"
perms = 400
env = true
}
resources {
cpu = 200
memory = 256

View File

@ -1,8 +1,8 @@
FROM danielberteaud/java:17.24.4-1
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
ARG TOMCAT_VERSION=10.1.20 \
DIAGRAMS_VERSION=24.2.3
ARG TOMCAT_VERSION=10.1.23 \
DIAGRAMS_VERSION=24.3.1
ENV CATALINA_HOME=/opt/tomcat \
TOMCAT_PORT=8282 \

View File

@ -1,7 +1,7 @@
FROM [[ .docker.repo ]][[ .docker.base_images.java17.image ]]
MAINTAINER [[ .docker.maintainer ]]
ARG TOMCAT_VERSION=10.1.20 \
ARG TOMCAT_VERSION=10.1.23 \
DIAGRAMS_VERSION=[[ .diagrams.version ]]
ENV CATALINA_HOME=/opt/tomcat \

View File

@ -2,7 +2,7 @@
instance: diagrams
diagrams:
version: 24.2.3
version: 24.3.1
image: '[[ .docker.repo ]]diagrams:[[ .diagrams.version ]]-1'
env: {}
public_url: https://draw.example.org