mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-22 08:13:18 +01:00
feat: interpolate name of user and database
Unless explicitely set, the database name is nevertheless derived from the user by the image's entrypoint, but we can make this more obvious by defining a interpolation here.
This commit is contained in:
parent
ce2caf7c8f
commit
911fcc61eb
@ -7,10 +7,9 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- POSTGRES_INITDB_ARGS=${POSTGRES_INITDB_ARGS---data-checksums}
|
- POSTGRES_INITDB_ARGS=${POSTGRES_INITDB_ARGS---data-checksums}
|
||||||
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD-}
|
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD-}
|
||||||
- POSTGRES_USER=${POSTGRES_USER}
|
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
||||||
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
|
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
|
||||||
# (Optional) when creating a new database
|
- POSTGRES_DB=${POSTGRES_DB:-$POSTGRES_USER}
|
||||||
# - POSTGRES_DB=${POSTGRES_DB}
|
|
||||||
- TZ=${TZ:-UTC}
|
- TZ=${TZ:-UTC}
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
Loading…
Reference in New Issue
Block a user