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 / &&\
|
mv web-vault / &&\
|
||||||
chown -R root:root /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>
|
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
|
||||||
|
|
||||||
ENV ROCKET_PROFILE=release \
|
ENV ROCKET_PROFILE=release \
|
||||||
|
|
|
@ -145,7 +145,6 @@ _EOT
|
||||||
env = true
|
env = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Use a template block instead of env {} so we can fetch values from vault
|
# Use a template block instead of env {} so we can fetch values from vault
|
||||||
template {
|
template {
|
||||||
data = <<_EOT
|
data = <<_EOT
|
||||||
|
|
|
@ -85,7 +85,7 @@ job "[[ .instance ]]" {
|
||||||
template {
|
template {
|
||||||
data =<<_EOT
|
data =<<_EOT
|
||||||
[[- if ne $c.postgres.pooler.engine "none" ]]
|
[[- 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 ]]
|
[[- 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 ]]]
|
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 ]]
|
[[- end ]]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user