Support other poolers
This commit is contained in:
parent
038f04c886
commit
610075ab1c
|
@ -94,6 +94,7 @@ job "miniflux" {
|
|||
|
||||
|
||||
|
||||
|
||||
task "miniflux" {
|
||||
driver = "docker"
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ job [[ .instance | toJSON ]] {
|
|||
|
||||
[[ template "common/task.wait_for" $c ]]
|
||||
|
||||
[[ template "common/task.pgbouncer" $c ]]
|
||||
[[ template "common/postgres_pooler" $c ]]
|
||||
|
||||
task "miniflux" {
|
||||
driver = [[ $c.nomad.driver | toJSON ]]
|
||||
|
@ -85,7 +85,7 @@ job [[ .instance | toJSON ]] {
|
|||
template {
|
||||
data =<<_EOT
|
||||
DATABASE_URL=postgresql://
|
||||
[[- if eq $c.postgres.pooler.engine "pgbouncer" -]]
|
||||
[[- if ne $c.postgres.pooler.engine "none" -]]
|
||||
[[ .instance ]]:{{ env "NOMAD_ALLOC_ID" }}@127.0.0.1:6432/[[ $c.postgres.database ]]?sslmode=disable
|
||||
[[- else -]]
|
||||
[[ $c.postgres.user ]]:[[ $c.postgres.password ]]@[[ $c.postgres.host ]]:[[ $c.postgres.port ]]/[[ $c.postgres.database ]]?sslmode=disable
|
||||
|
|
Loading…
Reference in New Issue