Fix handling postgres settings
This commit is contained in:
parent
4d7e50a5a1
commit
6986b74c98
|
@ -83,10 +83,10 @@ _EOT
|
|||
[[- if ne $c.postgres.pooler.engine "none" ]]
|
||||
BOUNCA_DB_USER=[[ .instance ]]
|
||||
BOUNCA_DB_PASSWORD={{ env "NOMAD_ALLOC_ID" }}
|
||||
BOUNCA_DB_PORT=6432
|
||||
BOUNCA_DB_PORT=[[ $c.postgres.pooler.port ]]
|
||||
[[- else ]]
|
||||
BOUNCA_DB_USER={{ with secret "[[ .vault.prefix ]]/database/creds/[[ .instance ]]" }}{{ .Data.username }}{{ end }}
|
||||
BOUNCA_DB_PASSWORD={{ with secret "[[ .vault.prefix ]]/database/creds/[[ .instance ]]" }}{{ .Data.password }}{{ end }}
|
||||
BOUNCA_DB_USER=[[ $c.postgres.user ]]
|
||||
BOUNCA_DB_PASSWORD=[[ $c.postgres.password ]]
|
||||
BOUNCA_DB_PORT=[[ $c.postgres.port ]]
|
||||
[[- end ]]
|
||||
_EOT
|
||||
|
|
|
@ -113,7 +113,6 @@ job "bounca" {
|
|||
BOUNCA_HOST = "pki.example.org"
|
||||
}
|
||||
|
||||
|
||||
# Use a template block instead of env {} so we can fetch values from vault
|
||||
template {
|
||||
data = <<_EOT
|
||||
|
@ -224,7 +223,6 @@ _EOT
|
|||
BOUNCA_PUBLIC_DIR = "/alloc/data/public"
|
||||
}
|
||||
|
||||
|
||||
# Use a template block instead of env {} so we can fetch values from vault
|
||||
template {
|
||||
data = <<_EOT
|
||||
|
|
Loading…
Reference in New Issue
Block a user