🐳 Set n8n and system timezone separately

This commit is contained in:
Jan Oberhauser 2019-10-29 08:27:26 +01:00
parent 0bc77e1292
commit 1b076a4763
3 changed files with 19 additions and 8 deletions

View file

@ -18,7 +18,4 @@ RUN apk --update add --virtual build-dependencies python build-base ca-certifica
WORKDIR /data
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["n8n"]

View file

@ -193,6 +193,25 @@ The following environment variables support file input:
- N8N_BASIC_AUTH_USER_FILE
## Setting Timezone
To define the timezone n8n should use the environment variable `GENERIC_TIMEZONE` can
be set. This gets used to by for example the Cron-Node.
Apart from that can also the timezone of the system be set separately. Which controls what
some scripts and commands return like `> date`. The system timezone can be set via
the environment variable `TZ`.
Example to use the same timezone for both:
```
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-e GENERIC_TIMEZONE="Europe/Berlin" \
-e TZ="Europe/Berlin" \
n8nio/n8n
```
## Build Docker-Image
```

View file

@ -1,5 +0,0 @@
#!/bin/sh
ln -s "/usr/share/zoneinfo/${GENERIC_TIMEZONE:-America/New_York}" /etc/localtime
exec "$@"