Wait for postgres

This commit is contained in:
Daniel Berteaud 2023-11-01 22:58:02 +01:00
parent 0461bf5777
commit 28c714acf9
2 changed files with 6 additions and 2 deletions

View File

@ -58,6 +58,8 @@ job [[ .miniflux.instance | toJSON ]] {
[[ template "common/task.metrics_proxy.tpl" $c ]]
[[- end ]]
[[ template "common/task.wait_for.tpl" $c ]]
task "miniflux" {
driver = [[ $c.nomad.driver | toJSON ]]

View File

@ -15,6 +15,9 @@ miniflux:
cpu: 50
memory: 192
wait_for:
- service: postgres
# Additional env var to pass to the container
env: {}
@ -25,7 +28,6 @@ miniflux:
db:
host: localhost
port: 5432
user: '[[ .miniflux.instance ]]'
name: '[[ .miniflux.instance ]]'
# Prometheus configuration
@ -36,6 +38,6 @@ prometheus:
consul:
connect:
upstreams:
- destination_name: postgres
- destination_name: 'postgres[[ .consul.suffix ]]'
local_bind_port: 5432