Use configured port for postgress pooler
This commit is contained in:
parent
a0ef85662c
commit
9cef0d414f
|
@ -34,7 +34,7 @@ RUN set -euxo pipefail &&\
|
|||
mv web-vault / &&\
|
||||
chown -R root:root /web-vault
|
||||
|
||||
FROM danielberteaud/alpine:24.1-2
|
||||
FROM danielberteaud/alpine:24.1-6
|
||||
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
|
||||
|
||||
ENV ROCKET_PROFILE=release \
|
||||
|
|
|
@ -145,7 +145,6 @@ _EOT
|
|||
env = true
|
||||
}
|
||||
|
||||
|
||||
# Use a template block instead of env {} so we can fetch values from vault
|
||||
template {
|
||||
data = <<_EOT
|
||||
|
|
|
@ -85,7 +85,7 @@ job "[[ .instance ]]" {
|
|||
template {
|
||||
data =<<_EOT
|
||||
[[- if ne $c.postgres.pooler.engine "none" ]]
|
||||
DATABASE_URL=postgresql://[[ .instance ]]:{{ env "NOMAD_ALLOC_ID" }}@localhost:6432/[[ $c.postgres.database ]]
|
||||
DATABASE_URL=postgresql://[[ .instance ]]:{{ env "NOMAD_ALLOC_ID" }}@localhost:[[ $c.postgres.pooler.port ]]/[[ $c.postgres.database ]]
|
||||
[[- else ]]
|
||||
DATABASE_URL=postgresql://[[ $c.postgres.user ]]:[[ $c.postgres.password | regexp.Replace "\\.Data\\.password" "urlquery .Data.password" ]]@[[ $c.postgres.host ]]:[[ $c.postgres.port ]]/[[ $c.postgres.database ]]]
|
||||
[[- end ]]
|
||||
|
|
Loading…
Reference in New Issue