-
Notifications
You must be signed in to change notification settings - Fork 340
fix #554 - add nested .env vars for PostgreSQL #561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||
|
|
||
| # 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. | ||
|
|
@@ -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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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}}} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I only added 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 | ||
|
|
@@ -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}}} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| image: postgres:${POSTGRES_VERSION:-17.9-alpine} | ||
| restart: ${RESTART:-always} | ||
| volumes: | ||
|
|
||
There was a problem hiding this comment.
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?