-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathdocker-compose.yml
93 lines (86 loc) · 2.27 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
version: "3.9"
volumes:
n8n_storage:
redis_storage:
postgres_storage:
x-shared: &shared
restart: always
build: .
environment:
NODE_ENV: "production"
N8N_HOST: "${HOST}"
N8N_PORT: "5678"
N8N_PROTOCOL: "${N8N_PROTOCOL}"
N8N_ENCRYPTION_KEY: "${N8N_ENCRYPTION_KEY}"
EXECUTIONS_DATA_SAVE_ON_ERROR: "none"
EXECUTIONS_DATA_SAVE_ON_SUCCESS: "none"
WEBHOOK_URL: "https://${HOST}/"
GENERIC_TIMEZONE: "${GENERIC_TIMEZONE}"
DB_TYPE: "postgresdb"
DB_POSTGRESDB_HOST: "postgres"
DB_POSTGRESDB_DATABASE: "${POSTGRES_DB}"
DB_POSTGRESDB_USER: "${POSTGRES_USER}"
DB_POSTGRESDB_PASSWORD: "${POSTGRES_PASSWORD}"
DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED: "true"
EXECUTIONS_MODE: "queue"
QUEUE_BULL_REDIS_HOST: "redis"
QUEUE_BULL_REDIS_PASSWORD: "${REDIS_PASSWORD}"
QUEUE_HEALTH_CHECK_ACTIVE: "true"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
services:
browserless:
image: browserless/chrome:latest
restart: always
environment:
DEBUG: "browserless:*"
MAX_CONCURRENT_SESSIONS: "5"
CONNECTION_TIMEOUT: "60000"
MAX_QUEUE_LENGTH: "20"
# PREBOOT_CHROME: "true"
DEMO_MODE: "false"
ENABLE_DEBUGGER: "false"
TOKEN: "${BROWSERLESS_TOKEN}"
PORT: "3000"
WORKSPACE_DELETE_EXPIRED: "true"
WORKSPACE_EXPIRE_DAYS: "1"
postgres:
image: postgres:16
restart: always
environment:
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
volumes:
- postgres_storage:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
restart: always
command: "redis-server --requirepass ${REDIS_PASSWORD}"
volumes:
- "redis_storage:/data"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
n8n:
<<: *shared
restart: always
volumes:
- "n8n_storage:/home/node/.n8n"
ports:
- "80:5678"
n8n-worker:
<<: *shared
command: "/bin/sh -c 'sleep 5; n8n worker'"
depends_on:
- "n8n"