Use group_start

This commit is contained in:
Daniel Berteaud 2024-04-09 10:27:46 +02:00
parent 1c72acbfb6
commit 579f78b689
3 changed files with 19 additions and 14 deletions

View File

@ -1,4 +1,4 @@
FROM danielberteaud/alpine:24.3-1
FROM danielberteaud/alpine:24.4-1
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
ARG VERSION=3.0.0-rc3

View File

@ -3,20 +3,27 @@ job "traefik" {
datacenters = ["dc1"]
region = "global"
priority = 70
constraint {
operator = "distinct_hosts"
value = "true"
}
group "traefik" {
count = 2
shutdown_delay = "6s"
constraint {
operator = "distinct_hosts"
value = "true"
}
ephemeral_disk {
# Use minimal ephemeral disk
size = 101
}
network {
mode = "bridge"
port "http" {

View File

@ -1,12 +1,10 @@
job "[[ .instance ]]" {
[[- $c:= merge .traefik . ]]
[[ template "common/job_start" $c ]]
[[ template "common/job_start" . ]]
group "traefik" {
count = [[ .traefik.count ]]
shutdown_delay = "6s"
[[ $c := merge .traefik . ]]
[[ template "common/group_start" $c ]]
network {
mode = "bridge"