Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#############################################
# Docker Environment Variables
# https://docs.zammad.org/en/latest/install/docker-compose/environment.html
# https://docs.zammad.org/en/latest/appendix/environment-variables.html
#############################################

#############################################
# docker-compose.yml - These variables only need to be set if they do not have the default value.
#############################################

# RESTART=always
RESTART=always
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you uncomment this?


# Use a fixed Zammad version rather than the default. If you do so,
# you are responsible to update this to newer patch level versions yourself.
Expand All @@ -33,12 +33,14 @@
# NGINX_PORT=8080
# NGINX_EXPOSE_PORT=8080
# NGINX_CLIENT_MAX_BODY_SIZE=50M
# POSTGRES_DB=zammad_production
# POSTGRES_PASS=zammad
# POSTGRES_USER=zammad
# POSTGRES_HOST=zammad-postgresql
# POSTGRES_PORT=5432
# POSTGRESQL_OPTIONS=?pool=50

# POSTGRESQL_DB=
# POSTGRESQL_HOST=
# POSTGRESQL_USER=
# POSTGRESQL_PASS=
# POSTGRESQL_PORT=
# POSTGRESQL_OPTIONS=
# POSTGRESQL_DB_CREATE=
Comment on lines +37 to +43
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the default values from these variables? They show the fallbacks that get used if you don't specify.


# ELASTICSEARCH_SCHEMA=http
# ELASTICSEARCH_HOST=zammad-elasticsearch
Expand Down
20 changes: 11 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ x-shared:
zammad-service: &zammad-service
environment: &zammad-environment
MEMCACHE_SERVERS: ${MEMCACHE_SERVERS:-zammad-memcached:11211}
POSTGRESQL_DB: ${POSTGRES_DB:-zammad_production}
POSTGRESQL_HOST: ${POSTGRES_HOST:-zammad-postgresql}
POSTGRESQL_USER: ${POSTGRES_USER:-zammad}
POSTGRESQL_PASS: ${POSTGRES_PASS:-zammad}
POSTGRESQL_PORT: ${POSTGRES_PORT:-5432}
POSTGRESQL_OPTIONS: ${POSTGRESQL_OPTIONS:-?pool=50}

# PostgreSQL
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}}}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

POSTGRESQL_PORT: ${POSTGRESQL_PORT:-${POSTGRES_PORT:-5432}}
POSTGRESQL_OPTIONS: ${POSTGRESQL_OPTIONS:-${POSTGRES_OPTIONS:-?pool=50}}
POSTGRESQL_DB_CREATE:

# Redis standalone
Expand Down Expand Up @@ -123,9 +125,9 @@ services:

zammad-postgresql:
environment:
POSTGRES_DB: ${POSTGRES_DB:-zammad_production}
POSTGRES_USER: ${POSTGRES_USER:-zammad}
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}}}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image: postgres:${POSTGRES_VERSION:-17.9-alpine}
restart: ${RESTART:-always}
volumes:
Expand Down