set the right timezone inside containers

This commit is contained in:
Marco Kundt 2021-04-12 14:40:45 +02:00
parent 4ee03115a5
commit cd9fd14cfe
2 changed files with 17 additions and 4 deletions

View File

@ -9,8 +9,11 @@ services:
restart: unless-stopped
volumes:
- ${POSTGRES_DATA_PATH}:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
environment:
# timezone inside container
- TZ
# necessay Postgres options/variables
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
@ -24,7 +27,9 @@ services:
- ${NGINX_DHPARAMS_FILE}:/dhparams4096.pem
- ${CERT_PATH}:/cert.pem:ro
- ${KEY_PATH}:/key.pem:ro
- /etc/localtime:/etc/localtime:ro
environment:
# timezone inside container
- TZ
ports:
- ${HTTPS_PORT}:443
- ${HTTP_PORT}:80
@ -42,9 +47,11 @@ services:
- ${MATTERMOST_LOGS_PATH}:/mattermost/logs:rw
- ${MATTERMOST_PLUGINS_PATH}:/mattermost/plugins:rw
- ${MATTERMOST_CLIENT_PLUGINS_PATH}:/mattermost/client-plugins:rw
- /etc/localtime:/etc/localtime:ro
environment:
# necessary options/variables (see env.example)
# timezone inside container
- TZ
# necessary Mattermost options/variables (see env.example)
- MM_SQLSETTINGS_DRIVERNAME
- MM_SQLSETTINGS_DATASOURCE

View File

@ -1,3 +1,9 @@
# Container settings
## Timezone inside the containers. The value needs to be in the form 'Europe/Berlin'.
## A list of these tz database names can be looked up at Wikipedia
## https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TZ=UTC
# Postrges settings
## Documentation for this image and available settings can be found on hub.docker.com
## https://hub.docker.com/_/postgres