Update postgres pooler
This commit is contained in:
parent
053cee7ac1
commit
077c893ac5
|
@ -107,6 +107,7 @@ job "immich" {
|
|||
|
||||
|
||||
|
||||
|
||||
# The main immich API server
|
||||
task "server" {
|
||||
driver = "docker"
|
||||
|
|
|
@ -67,7 +67,7 @@ job [[ .instance | toJSON ]] {
|
|||
}
|
||||
|
||||
[[ template "common/task.wait_for" $c ]]
|
||||
[[ template "common/task.pgbouncer" $c ]]
|
||||
[[ template "common/postgres_pooler" $c ]]
|
||||
|
||||
# The main immich API server
|
||||
task "server" {
|
||||
|
@ -96,7 +96,7 @@ job [[ .instance | toJSON ]] {
|
|||
template {
|
||||
data =<<_EOT
|
||||
DB_URL=postgres://
|
||||
[[- 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 ]]
|
||||
[[- else -]]
|
||||
[[ $c.postgres.user ]]:[[ $c.postgres.password ]]@[[ $c.postgres.host ]]:[[ $c.postgres.port ]]/[[ $c.postgres.database ]]
|
||||
|
@ -144,7 +144,7 @@ _EOT
|
|||
template {
|
||||
data =<<_EOT
|
||||
DB_URL=postgres://
|
||||
[[- 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 ]]
|
||||
[[- else -]]
|
||||
[[ $c.postgres.user ]]:[[ $c.postgres.password ]]@[[ $c.postgres.host ]]:[[ $c.postgres.port ]]/[[ $c.postgres.database ]]
|
||||
|
|
Loading…
Reference in New Issue