container: set TZ variable

This commit is contained in:
uumas
2023-04-18 19:37:29 +03:00
parent 7369fe30db
commit 6fb2e23151
3 changed files with 8 additions and 1 deletions

View File

@@ -2,3 +2,5 @@
docker_host_user: false
docker_volume_type: named
timezone: Etc/UTC

View File

@@ -117,3 +117,8 @@ argument_specs:
type: list
required: false
elements: str
timezone:
description: "Timezone set in the TZ env var"
type: str
required: false
default: Etc/UTC

View File

@@ -66,7 +66,7 @@
mounts: "{{ docker_volume_definition }}"
published_ports: "{{ container_published_ports + docker_published_ports }}"
labels: "{{ traefik_labels | default(omit) }}"
env: "{{ docker_env | combine(docker_additional_env) }}"
env: "{{ docker_env | combine(docker_additional_env) | combine({'TZ': timezone}) }}"
entrypoint: "{{ docker_entrypoint | default(omit) }}"
restart_policy: always
network_mode: "{{ docker_network_mode | default(omit) }}"