mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
🐳 Set n8n and system timezone separately
This commit is contained in:
parent
0bc77e1292
commit
1b076a4763
|
@ -18,7 +18,4 @@ RUN apk --update add --virtual build-dependencies python build-base ca-certifica
|
||||||
|
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
COPY docker-entrypoint.sh /usr/local/bin/
|
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
||||||
|
|
||||||
CMD ["n8n"]
|
CMD ["n8n"]
|
||||||
|
|
|
@ -193,6 +193,25 @@ The following environment variables support file input:
|
||||||
- N8N_BASIC_AUTH_USER_FILE
|
- 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
|
## Build Docker-Image
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
ln -s "/usr/share/zoneinfo/${GENERIC_TIMEZONE:-America/New_York}" /etc/localtime
|
|
||||||
|
|
||||||
exec "$@"
|
|
Loading…
Reference in a new issue