paperless-ngx/templates/dbenv

22 lines
530 B
Plaintext
Raw Permalink Normal View History

2024-01-12 21:52:20 +01:00
[[- /*
vim: syntax=hcl
*/]]
template {
data =<<_EOT
[[- if ne .postgres.pooler.engine "none" ]]
PAPERLESS_DBHOST=127.0.0.1
PAPERLESS_DBPORT=[[ .postgres.pooler.port ]]
2024-01-12 21:52:20 +01:00
PAPERLESS_DBUSER=[[ .instance ]]
PAPERLESS_DBPASS={{ env "NOMAD_ALLOC_ID" }}
[[- else ]]
PAPERLESS_DBHOST=[[ .postgres.host ]]
PAPERLESS_DBPORT=[[ .postgres.port ]]
PAPERLESS_DBUSER=[[ .postgres.user ]]
PAPERLESS_DBPASS=[[ .postgres.password ]]
[[- end ]]
_EOT
destination = "secrets/.db.env"
perms = 400
env = true
}