Browse Source

changes required for self-hosting n8n in a Docker Compose setup with DTP Newsroom support.

develop
Rob Colbert 2 months ago
parent
commit
29f2c719bf
  1. 13
      docker-compose/withPostgres/docker-compose.yml

13
docker-compose/withPostgres/docker-compose.yml

@ -1,4 +1,4 @@
version: '3.8'
version: "3.8"
volumes:
db_storage:
@ -18,7 +18,11 @@ services:
- db_storage:/var/lib/postgresql/data
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
healthcheck:
test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
test:
[
"CMD-SHELL",
"pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}",
]
interval: 5s
timeout: 5s
retries: 10
@ -33,12 +37,17 @@ services:
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- WEBHOOK_URL=https://n8n.digitaltelepresence.com/
- NODE_FUNCTION_ALLOW_BUILTIN=*
- NODE_FUNCTION_ALLOW_EXTERNAL=dayjs,numeral
ports:
- 5678:5678
links:
- postgres
volumes:
- n8n_storage:/home/node/.n8n
- /home/dtp/live/dtp-n8n-hosting/node_modules/dayjs:/usr/local/lib/node_modules/dayjs
- /home/dtp/live/dtp-n8n-hosting/node_modules/numeral:/usr/local/lib/node_modules/numeral
depends_on:
postgres:
condition: service_healthy

Loading…
Cancel
Save