fix #554 - add nested .env vars for PostgreSQL#561
Conversation
derpixler
commented
Apr 2, 2026
| ############################################# | ||
|
|
||
| # RESTART=always | ||
| RESTART=always |
There was a problem hiding this comment.
Why did you uncomment this?
| # POSTGRESQL_DB= | ||
| # POSTGRESQL_HOST= | ||
| # POSTGRESQL_USER= | ||
| # POSTGRESQL_PASS= | ||
| # POSTGRESQL_PORT= | ||
| # POSTGRESQL_OPTIONS= | ||
| # POSTGRESQL_DB_CREATE= |
There was a problem hiding this comment.
Why did you remove the default values from these variables? They show the fallbacks that get used if you don't specify.
| POSTGRESQL_DB: ${POSTGRESQL_DB:-${POSTGRES_DB:-zammad_production}} | ||
| POSTGRESQL_HOST: ${POSTGRESQL_HOST:-${POSTGRES_HOST:-zammad-postgresql}} | ||
| POSTGRESQL_USER: ${POSTGRESQL_USER:-${POSTGRES_USER:-zammad}} | ||
| POSTGRESQL_PASS: ${POSTGRESQL_PASS:-${POSTGRES_PASS:-${POSTGRES_PASSWORD:-zammad}}} |
There was a problem hiding this comment.
Why did you introduce a new POSTGRES_PASSWORD variable here which was not there before, and only for one variant? I understand _PASS is not the best naming, but should we add more complexity here?
There was a problem hiding this comment.
I only added POSTGRES_PASSWORD for the password because that’s the name the official Postgres image uses, and some .env templates only define that — Zammad would still pick up the same secret when people don’t use POSTGRES_PASS.
If we want to avoid extra complexity, we can drop the third fallback and only support POSTGRESQL_* and POSTGRES_* (including POSTGRES_PASS); that stays consistent with the other variables and the existing docs.
| POSTGRES_PASSWORD: ${POSTGRES_PASS:-zammad} | ||
| POSTGRES_DB: ${POSTGRESQL_DB:-${POSTGRES_DB:-zammad_production}} | ||
| POSTGRES_USER: ${POSTGRESQL_USER:-${POSTGRES_USER:-zammad}} | ||
| POSTGRES_PASSWORD: ${POSTGRESQL_PASS:-${POSTGRES_PASS:-${POSTGRES_PASSWORD:-zammad}}} |
There was a problem hiding this comment.
|
On which platforms did you test these changes? |