Use configured port for postgres pooler

This commit is contained in:
Daniel Berteaud 2024-01-19 15:00:44 +01:00
parent 0fb4482071
commit 9f08c15979
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ job "[[ .instance ]]" {
data =<<_EOT
DB_URL=postgres://
[[- if ne $c.postgres.pooler.engine "none" -]]
[[ .instance ]]:{{ env "NOMAD_ALLOC_ID" }}@127.0.0.1:6432/[[ $c.postgres.database ]]
[[ .instance ]]:{{ env "NOMAD_ALLOC_ID" }}@127.0.0.1:[[ $c.postgres.pooler.port ]]/[[ $c.postgres.database ]]
[[- else -]]
[[ $c.postgres.user ]]:[[ $c.postgres.password ]]@[[ $c.postgres.host ]]:[[ $c.postgres.port ]]/[[ $c.postgres.database ]]
[[- end ]]