forked from danilopinotti/n8n-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
92 lines (85 loc) · 2.03 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
version: '3.8'
volumes:
db_storage:
n8n_storage:
redis_storage:
x-shared: &shared
restart: always
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- EXECUTIONS_MODE=queue
- QUEUE_BULL_REDIS_HOST=redis
- QUEUE_HEALTH_CHECK_ACTIVE=true
- N8N_BASIC_AUTH_ACTIVE=false
- N8N_PROTOCOL=https
- VUE_APP_URL_BASE_API=https://${N8N_HOST}
- WEBHOOK_TUNNEL_URL=https://${N8N_HOST}
links:
- postgres
- redis
volumes:
- n8n_storage:/home/node/
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
services:
https-portal:
image: steveltn/https-portal:1
ports:
- '80:80'
- '443:443'
links:
- n8n
restart: always
environment:
DOMAINS: '${N8N_HOST} -> http://n8n:5678'
STAGE: ${STAGE:-staging}
FORCE_RENEW: 'true'
CUSTOM_NGINX_SERVER_CONFIG_BLOCK: |
proxy_buffering off;
postgres:
image: postgres:11
restart: always
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_NON_ROOT_USER
- POSTGRES_NON_ROOT_PASSWORD
volumes:
- db_storage:/var/lib/postgresql/data
- ./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
redis:
image: redis:6-alpine
restart: always
volumes:
- redis_storage:/data
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 5s
retries: 10
n8n:
<<: *shared
image: n8nio/n8n
command: /bin/sh -c "n8n start"
# ports:
# - 5678:5678
n8n-worker:
<<: *shared
image: n8nio/n8n
command: /bin/sh -c "sleep 5; n8n worker"
depends_on:
- n8n