Skip to content

Commit 7b51b05

Browse files
committed
chore: update n8n
1 parent c871ded commit 7b51b05

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

examples/n8n/.env

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
## database settings
12
POSTGRES_USER=postgres
23
POSTGRES_PASSWORD=MySecureRootDbUserPassword
34
POSTGRES_DB=n8n
4-
55
POSTGRES_NON_ROOT_USER=n8n
66
POSTGRES_NON_ROOT_PASSWORD=MySecureDatabaseUserPassword
7+
8+
## application settings
9+
N8N_NODE_ENV=production
10+
N8N_TZ=Europe/Berlin
11+
12+
## tls proxy settings
13+
N8N_HOST=n8n.example.com
14+
N8N_PROTOCOL=http
15+
N8N_WEBHOOK_URL=https://n8n.example.com/
16+
17+
## npm extra options
18+
# this will install additional npm packages during container start
19+
EXTRA_NODE_MODULES=lodash
20+
21+
# this will whitelist additional npm packages
22+
NODE_FUNCTION_ALLOW_EXTERNAL=lodash

examples/n8n/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ mv init-database.sh /mnt/docker-volumes/n8n/.
1919
# fix permissions
2020
sudo chown -R 0:1000 /mnt/docker-volumes/n8n/
2121
sudo chmod -R 775 /mnt/docker-volumes/n8n/
22+
23+
# adjust environment variables
24+
nano .env
2225
````
2326

24-
Afterwards, you can proceed spawning up the docker compose stack with:
27+
Afterwards, you can proceed spawning up the docker compose stack:
2528

2629
````
2730
docker compose up -d

examples/n8n/docker-compose.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,22 @@ services:
2929
hostname: n8n
3030
restart: unless-stopped
3131
environment:
32+
# database settings
3233
- DB_TYPE=postgresdb
3334
- DB_POSTGRESDB_HOST=n8n-db
3435
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
3536
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
3637
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
37-
- EXTRA_NODE_MODULES=lodash
38-
- NODE_FUNCTION_ALLOW_EXTERNAL=lodash
38+
# application settings
39+
- NODE_ENV=${N8N_NODE_ENV}
40+
- GENERIC_TIMEZONE=${N8N_TZ}
41+
# tls proxy settings
42+
- N8N_HOST=${N8N_HOST}
43+
- N8N_PROTOCOL=${N8N_PROTOCOL}
44+
- WEBHOOK_URL=${N8N_WEBHOOK_URL}
45+
# npm extra options
46+
- EXTRA_NODE_MODULES=${N8N_EXTRA_NODE_MODULES}
47+
- NODE_FUNCTION_ALLOW_EXTERNAL=${N8N_NODE_FUNCTION_ALLOW_EXTERNAL}
3948
ports:
4049
- 5678:5678
4150
expose:
@@ -44,6 +53,7 @@ services:
4453
- n8n-db
4554
volumes:
4655
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/n8n/storage:/home/node/.n8n
56+
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/n8n/files:/files
4757
depends_on:
4858
n8n-db:
4959
condition: service_healthy

0 commit comments

Comments
 (0)