mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2025-08-19 11:20:33 +02: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:
@@ -7,10 +7,9 @@ services:
|
||||
environment:
|
||||
- POSTGRES_INITDB_ARGS=${POSTGRES_INITDB_ARGS---data-checksums}
|
||||
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD-}
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
||||
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
|
||||
# (Optional) when creating a new database
|
||||
# - POSTGRES_DB=${POSTGRES_DB}
|
||||
- POSTGRES_DB=${POSTGRES_DB:-$POSTGRES_USER}
|
||||
- TZ=${TZ:-UTC}
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
Reference in New Issue
Block a user