From f6dee345b705441b8aca865dc9dfafdfbee259c4 Mon Sep 17 00:00:00 2001 From: ksurl Date: Thu, 2 Jun 2022 11:58:59 -0700 Subject: [PATCH] add timezone for docker install --- docker-compose.yml | 1 + docs/install.md | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d4841bc0..2ab66a8c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,7 @@ services: volumes: - /var/cache/ntfy:/var/cache/ntfy - /etc/ntfy:/etc/ntfy + - /etc/localtime:/etc/localtime:ro ports: - 80:80 restart: unless-stopped diff --git a/docs/install.md b/docs/install.md index 6489d890..8fe43baa 100644 --- a/docs/install.md +++ b/docs/install.md @@ -239,10 +239,11 @@ docker run \ serve ``` -With other config options and non-root user (configured via `/etc/ntfy/server.yml`, see [configuration](config.md) for details): +With other config options, host-matched timezone, and non-root user (configured via `/etc/ntfy/server.yml`, see [configuration](config.md) for details): ```bash docker run \ -v /etc/ntfy:/etc/ntfy \ + -v /etc/localtime:/etc/localtime:ro \ -p 80:80 \ -u UID:GID \ -it \ @@ -264,6 +265,7 @@ services: volumes: - /var/cache/ntfy:/var/cache/ntfy - /etc/ntfy:/etc/ntfy + - /etc/localtime:/etc/localtime:ro # set timezone to match host ports: - 80:80 restart: unless-stopped