chore: update n8n

This commit is contained in:
LRVT 2024-09-27 01:09:20 +02:00
parent c871ded2e3
commit 7b51b0570b
3 changed files with 33 additions and 4 deletions

View File

@ -1,6 +1,22 @@
## database settings
POSTGRES_USER=postgres
POSTGRES_PASSWORD=MySecureRootDbUserPassword
POSTGRES_DB=n8n
POSTGRES_NON_ROOT_USER=n8n
POSTGRES_NON_ROOT_PASSWORD=MySecureDatabaseUserPassword
## application settings
N8N_NODE_ENV=production
N8N_TZ=Europe/Berlin
## tls proxy settings
N8N_HOST=n8n.example.com
N8N_PROTOCOL=http
N8N_WEBHOOK_URL=https://n8n.example.com/
## npm extra options
# this will install additional npm packages during container start
EXTRA_NODE_MODULES=lodash
# this will whitelist additional npm packages
NODE_FUNCTION_ALLOW_EXTERNAL=lodash

View File

@ -19,9 +19,12 @@ mv init-database.sh /mnt/docker-volumes/n8n/.
# fix permissions
sudo chown -R 0:1000 /mnt/docker-volumes/n8n/
sudo chmod -R 775 /mnt/docker-volumes/n8n/
# adjust environment variables
nano .env
````
Afterwards, you can proceed spawning up the docker compose stack with:
Afterwards, you can proceed spawning up the docker compose stack:
````
docker compose up -d

View File

@ -29,13 +29,22 @@ services:
hostname: n8n
restart: unless-stopped
environment:
# database settings
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=n8n-db
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- EXTRA_NODE_MODULES=lodash
- NODE_FUNCTION_ALLOW_EXTERNAL=lodash
# application settings
- NODE_ENV=${N8N_NODE_ENV}
- GENERIC_TIMEZONE=${N8N_TZ}
# tls proxy settings
- N8N_HOST=${N8N_HOST}
- N8N_PROTOCOL=${N8N_PROTOCOL}
- WEBHOOK_URL=${N8N_WEBHOOK_URL}
# npm extra options
- EXTRA_NODE_MODULES=${N8N_EXTRA_NODE_MODULES}
- NODE_FUNCTION_ALLOW_EXTERNAL=${N8N_NODE_FUNCTION_ALLOW_EXTERNAL}
ports:
- 5678:5678
expose:
@ -44,6 +53,7 @@ services:
- n8n-db
volumes:
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/n8n/storage:/home/node/.n8n
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/n8n/files:/files
depends_on:
n8n-db:
condition: service_healthy