64 lines
1.6 KiB
YAML
64 lines
1.6 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
n8n-postgres:
|
|
container_name: {{ customer }}-n8n-postgres
|
|
restart: always
|
|
image: postgres:16 #original: postgres:latest
|
|
environment:
|
|
- POSTGRES_DB=n8n
|
|
- POSTGRES_USER={{ n8n_postgres_user }}
|
|
- POSTGRES_PASSWORD={{ n8n_postgres_password }}
|
|
volumes:
|
|
- {{ customer }}-n8n-postgres:/var/lib/postgresql/data
|
|
- {{ customer }}-n8n-backups:/tmp/backups
|
|
networks:
|
|
{{ customer }}-n8n:
|
|
ipv4_address: 172.20.8.2
|
|
|
|
n8n:
|
|
container_name: {{ customer }}-n8n
|
|
restart: always
|
|
image: docker.n8n.io/n8nio/n8n
|
|
labels:
|
|
- "diun.enable=true"
|
|
ports:
|
|
- "127.0.0.1:3025:5678"
|
|
environment:
|
|
- DB_TYPE=postgresdb
|
|
- DB_POSTGRESDB_DATABASE=n8n
|
|
- DB_POSTGRESDB_HOST=n8n-postgres
|
|
- DB_POSTGRESDB_PORT=5432
|
|
- DB_POSTGRESDB_USER={{ n8n_postgres_user }}
|
|
#- DB_POSTGRESDB_SCHEMA=public
|
|
- DB_POSTGRESDB_PASSWORD={{ n8n_postgres_password }}
|
|
- N8N_EDITOR_BASE_URL=https://{{ domain_n8n }}
|
|
- N8N_EMAIL_MODE=smtp
|
|
- N8N_SMTP_SSL=false
|
|
- N8N_SMTP_HOST=
|
|
- N8N_SMTP_PORT=
|
|
- N8N_SMTP_USER=
|
|
- N8N_SMTP_PASS=
|
|
- N8N_SMTP_SENDER=
|
|
volumes:
|
|
- {{ customer }}-n8n-storage:/home/node/.n8n
|
|
- {{ customer }}-n8n-backups:/tmp/backups
|
|
links:
|
|
- n8n-postgres
|
|
networks:
|
|
{{ customer }}-n8n:
|
|
ipv4_address: 172.20.8.3
|
|
|
|
networks:
|
|
{{ customer }}-n8n:
|
|
ipam:
|
|
driver: default
|
|
config:
|
|
- subnet: 172.20.8.0/28
|
|
gateway: 172.20.8.1
|
|
|
|
volumes:
|
|
{{ customer }}-n8n-postgres:
|
|
{{ customer }}-n8n-storage:
|
|
{{ customer }}-n8n-backups:
|