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: volumes:
db_storage: db_storage:
@ -18,7 +18,11 @@ services:
- db_storage:/var/lib/postgresql/data - db_storage:/var/lib/postgresql/data
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh - ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
healthcheck: 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 interval: 5s
timeout: 5s timeout: 5s
retries: 10 retries: 10
@ -33,12 +37,17 @@ services:
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB} - DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER} - DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD} - DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- WEBHOOK_URL=https://n8n.digitaltelepresence.com/
- NODE_FUNCTION_ALLOW_BUILTIN=*
- NODE_FUNCTION_ALLOW_EXTERNAL=dayjs,numeral
ports: ports:
- 5678:5678 - 5678:5678
links: links:
- postgres - postgres
volumes: volumes:
- n8n_storage:/home/node/.n8n - 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: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy

Loading…
Cancel
Save