Adapt for new wait_for

This commit is contained in:
Daniel Berteaud 2023-10-30 23:51:20 +01:00
parent 65e1b487a8
commit f5e09c4ffd
3 changed files with 9 additions and 6 deletions

View File

@ -18,9 +18,7 @@ job "[[ .mariadb.instance ]]-manage" {
[[ template "common/connect.tpl" $c ]]
}
[[ template "common/task.wait_for.tpl" dict
"ctx" .
"wait_for" (coll.Slice (dict "service" .mariadb.instance)) ]]
[[ template "common/task.wait_for.tpl" $c ]]
task "manage" {
driver = [[ $c.nomad.driver | toJSON ]]

View File

@ -180,9 +180,7 @@ _EOT
[[ template "common/connect.tpl" $c ]]
}
[[ template "common/task.wait_for.tpl" dict
"ctx" .
"wait_for" (coll.Slice (dict "service" .mariadb.instance)) ]]
[[ template "common/task.wait_for.tpl" $c ]]
task "backup" {
driver = [[ $c.nomad.driver | toJSON ]]

View File

@ -52,6 +52,10 @@ mariadb:
cpu: 10
memory: 64
# Service to wait for
wait_for:
- service: '[[ .mariadb.instance ]]'
# Custom env vars to pass to the container
env: {}
@ -88,6 +92,9 @@ mariadb:
cpu: 200
memory: 128
wait_for:
- service: '[[ .mariadb.instance ]]'
# Consul settings
consul:
connect: