forked from wnstify/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (71 loc) · 2.16 KB
/
docker-compose.yml
File metadata and controls
71 lines (71 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
services:
n8n-postgres:
image: postgres:16
restart: always
container_name: n8n-postgres
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_NON_ROOT_USER
- POSTGRES_NON_ROOT_PASSWORD
- PUID=1000
- PGID=1000
volumes:
- ${PWD}/db_storage:/var/lib/postgresql/data
- ${PWD}/init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
healthcheck:
test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 5s
timeout: 5s
retries: 10
security_opt:
- no-new-privileges:true
labels:
- "com.centurylinklabs.watchtower.enable=true"
networks:
- your-network # Change Value
n8n:
image: docker.n8n.io/n8nio/n8n
container_name: n8n
restart: always
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=n8n-postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
- PUID=1000
- PGID=1000
# - N8N_EMAIL_MODE=smtp
# - N8N_SMTP_HOST=smtp.postmarkapp.com
# - N8N_SMTP_PORT=587
# - N8N_SMTP_USER=your-api # Change Value
# - N8N_SMTP_PASS=your-api # Change Value
# - N8N_SMTP_SSL=false
# - N8N_SMTP_SENDER=your-sender # Change Value
- WEBHOOK_URL=https://something.example.com/ # Change Value
- N8N_PROTOCOL=https
- N8N_HOST=something.example.com # Change Value
- N8N_ENCRYPTION_KEY=your-key # Change Value
- GENERIC_TIMEZONE=Europe/Bratislava # Change Value to your correct Timezone
ports:
- 127.0.0.1:5678:5678 #Localhost only with reverse-proxy
links:
- n8n-postgres
volumes:
- ${PWD}/n8n_storage:/home/node/.n8n
depends_on:
n8n-postgres:
condition: service_healthy
security_opt:
- no-new-privileges:true
labels:
- "com.centurylinklabs.watchtower.enable=true"
networks:
- your-network # Change Value
networks:
your-network: # Change Value
external: true