-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
143 lines (137 loc) · 3.54 KB
/
docker-compose.yml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
version: "3.8"
services:
n8n-master:
image: n8nio/n8n:1.8.1
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
ports:
- 5678:5678
environment:
- DB_POSTGRESDB_DATABASE=postgres
- DB_POSTGRESDB_USER=postgres
- DB_POSTGRESDB_PASSWORD=pass
- DB_POSTGRESDB_HOST=db
- DB_POSTGRESDB_PORT=5432
- DB_TYPE=postgresdb
- N8N_BASIC_AUTH_PASSWORD=123
- N8N_BASIC_AUTH_USER=admin
- EXECUTIONS_DATA_MAX_AGE=72
- EXECUTIONS_DATA_PRUNE="true"
- GENERIC_TIMEZONE=America/Sao_Paulo
- N8N_BASIC_AUTH_ACTIVE="true"
- N8N_ENCRYPTION_KEY=ae1e030c-2bb1-4175-9028-20c2d87276c5
- QUEUE_BULL_REDIS_HOST=redis
- QUEUE_BULL_REDIS_PORT=6379
- N8N_DISABLE_PRODUCTION_MAIN_PROCESS=true
- N8N_SKIP_WEBHOOK_DEREGISTRATION_SHUTDOWN=true
- QUEUE_HEALTH_CHECK_ACTIVE=true
restart: always
healthcheck:
test: wget -nv -t1 --spider http://localhost:5678/healthz || exit 1
interval: 30s
retries: 5
start_period: 20s
timeout: 10s
networks:
- n8n
n8n-worker-1:
image: n8nio/n8n:1.8.1
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
n8n-master:
condition: service_healthy
environment:
- N8N_ENCRYPTION_KEY=ae1e030c-2bb1-4175-9028-20c2d87276c5
- EXECUTIONS_MODE=queue
- QUEUE_BULL_REDIS_HOST=redis
- QUEUE_BULL_REDIS_PORT=6379
- DB_POSTGRESDB_DATABASE=postgres
- DB_POSTGRESDB_USER=postgres
- DB_POSTGRESDB_PASSWORD=pass
- DB_POSTGRESDB_HOST=db
- DB_POSTGRESDB_PORT=5432
- DB_TYPE=postgresdb
command: ["worker"]
restart: always
networks:
- n8n
n8n-worker-2:
image: n8nio/n8n:1.8.1
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
n8n-master:
condition: service_healthy
environment:
- N8N_ENCRYPTION_KEY=ae1e030c-2bb1-4175-9028-20c2d87276c5
- EXECUTIONS_MODE=queue
- QUEUE_BULL_REDIS_HOST=redis
- QUEUE_BULL_REDIS_PORT=6379
- DB_POSTGRESDB_DATABASE=postgres
- DB_POSTGRESDB_USER=postgres
- DB_POSTGRESDB_PASSWORD=pass
- DB_POSTGRESDB_HOST=db
- DB_POSTGRESDB_PORT=5432
- DB_TYPE=postgresdb
command: ["worker", "--concurrency=5"]
restart: always
networks:
- n8n
n8n-webhook-1:
image: n8nio/n8n:1.8.1
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
n8n-master:
condition: service_healthy
ports:
- 5679:5678
environment:
- N8N_ENCRYPTION_KEY=ae1e030c-2bb1-4175-9028-20c2d87276c5
- EXECUTIONS_MODE=queue
- QUEUE_BULL_REDIS_HOST=redis
- QUEUE_BULL_REDIS_PORT=6379
- DB_POSTGRESDB_DATABASE=postgres
- DB_POSTGRESDB_USER=postgres
- DB_POSTGRESDB_PASSWORD=pass
- DB_POSTGRESDB_HOST=db
- DB_POSTGRESDB_PORT=5432
- DB_TYPE=postgresdb
command: ["webhook"]
restart: always
networks:
- n8n
redis:
image: redis:latest
restart: always
healthcheck:
test: ["CMD", "redis-cli","ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- n8n
db:
image: postgres:16.0-alpine3.18
restart: always
environment:
- POSTGRES_PASSWORD=pass
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
networks:
- n8n
networks:
n8n: