-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
78 lines (73 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
78 lines (73 loc) · 1.52 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
72
73
74
75
76
77
78
services:
redis:
image: redis:7.2-alpine
container_name: n8n-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- n8n-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
postgres:
image: postgres:latest
container_name: n8n-postgres
environment:
POSTGRES_DB: n8n
POSTGRES_USER: n8n_user
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- n8n-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U n8n_user -d n8n"]
interval: 10s
timeout: 5s
retries: 5
n8n-main:
image: n8nio/n8n:latest
container_name: n8n-main
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
env_file:
- .env
volumes:
- n8n_data:/home/node/.n8n
ports:
- "5678:5678"
networks:
- n8n-network
restart: unless-stopped
n8n-worker:
image: n8nio/n8n:latest
container_name: n8n-worker
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
env_file:
- .env
volumes:
- n8n_data:/home/node/.n8n
command: worker
networks:
- n8n-network
restart: unless-stopped
volumes:
postgres_data:
redis_data:
n8n_data:
networks:
n8n-network:
driver: bridge