-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.advanced.yml
84 lines (77 loc) · 2.25 KB
/
docker-compose.advanced.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
version: "3.8"
volumes:
broker:
database:
media:
x-taiga-common: &taiga-common
image: taigaio/taiga5:latest
volumes:
- media:/srv/taiga-back/media
- ./docker-compose/front.json:/etc/opt/taiga-front/conf.json:ro
- ./docker-compose/settings.py:/etc/opt/taiga-back/settings.py:ro
services:
broker:
image: rabbitmq:3.8
environment:
RABBITMQ_DEFAULT_VHOST: taiga
RABBITMQ_NODENAME: rabbit@localhost
volumes:
- broker:/var/lib/rabbitmq
database:
image: postgres:13
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PORT: ${POSTGRES_PORT}
stop_signal: SIGINT
volumes:
- database:/var/lib/postgresql/data
events:
image: taigaio/taiga-events5:latest
deploy:
replicas: 1
update_config:
order: start-first
healthcheck:
interval: 5s
# Taiga-events seems unable to reconnect to message broker when connection cannot be
# established or is closed. There also does not seem to be another way to tell if the server
# is actually able to communicate with the broker.
test: "wget -q -t 1 http://localhost:8080 2>&1 | grep -q '426 Upgrade Required' &&
! egrep -m 1 -q '^Unhandled rejection ' /var/log/taiga-events.log"
volumes:
- ./docker-compose/events.json:/etc/opt/taiga-events/config.json:ro
migrations:
<<: *taiga-common
command:
- migrate
# Make sure this command is run only during the initial setup as it will
# overwrite existing data.
- populate-db
deploy:
restart_policy:
condition: on-failure
delay: 5s
reverse-proxy:
image: nginx:1.17
ports:
- "${PORT:-8888}:80"
stop_signal: SIGQUIT
volumes:
- ./docker-compose/default.conf:/etc/nginx/conf.d/default.conf:ro
server:
<<: *taiga-common
command: run-server
deploy:
replicas: 1
update_config:
order: start-first
environment:
UWSGI_HTTP: ~
UWSGI_HTTP_SOCKET: :${PORT:-8888}
UWSGI_OFFLOAD_THREADS: 4
UWSGI_UWSGI_SOCKET: :3031
healthcheck:
test: wget -q -t 1 --spider http://localhost:${PORT:-8888}/api/v1/
stop_signal: SIGHUP