Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit de8077a

Browse files
nightahrichvdh
authored andcommitted
Add ability to set timezone for Docker container (#5383)
Signed-off-by: Amir Zarrinkafsh <[email protected]>
1 parent 948488e commit de8077a

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

changelog.d/5383.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add ability to change Docker containers [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) with the `TZ` variable.

docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ RUN apk add --no-cache --virtual .runtime_deps \
6666
libpq \
6767
zlib \
6868
su-exec \
69+
tzdata \
6970
xmlsec
7071

7172
COPY --from=builder /install /usr/local

docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ The following environment variables are supported in `generate` mode:
6363
* `UID`, `GID`: the user id and group id to use for creating the data
6464
directories. Defaults to `991`, `991`.
6565

66-
6766
## Running synapse
6867

6968
Once you have a valid configuration file, you can start synapse as follows:
@@ -91,6 +90,7 @@ The following environment variables are supported in run mode:
9190
* `SYNAPSE_CONFIG_PATH`: path to the config file. Defaults to
9291
`<SYNAPSE_CONFIG_DIR>/homeserver.yaml`.
9392
* `UID`, `GID`: the user and group id to run Synapse as. Defaults to `991`, `991`.
93+
* `TZ`: the [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) the container will run with. Defaults to `UTC`.
9494

9595
## TLS support
9696

0 commit comments

Comments
 (0)