Skip to content

Commit

Permalink
chore: update n8n
Browse files Browse the repository at this point in the history
  • Loading branch information
l4rm4nd committed Sep 26, 2024
1 parent c871ded commit 7b51b05
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
18 changes: 17 additions & 1 deletion examples/n8n/.env
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion examples/n8n/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 12 additions & 2 deletions examples/n8n/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 7b51b05

Please sign in to comment.