File tree Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 1+ # # database settings
12POSTGRES_USER = postgres
23POSTGRES_PASSWORD = MySecureRootDbUserPassword
34POSTGRES_DB = n8n
4-
55POSTGRES_NON_ROOT_USER = n8n
66POSTGRES_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
Original file line number Diff line number Diff line change @@ -19,9 +19,12 @@ mv init-database.sh /mnt/docker-volumes/n8n/.
1919# fix permissions
2020sudo chown -R 0:1000 /mnt/docker-volumes/n8n/
2121sudo 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````
2730docker compose up -d
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments