-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-compose.yml
149 lines (138 loc) · 4.72 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
144
145
146
147
148
149
version: "3.1"
services:
postgres:
build:
context: .
dockerfile: docker/postgres/Dockerfile
restart: "always"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 10s
timeout: 5s
retries: 3
volumes:
- ./data/postgres:/var/lib/postgresql/data
mysql:
build:
context: .
dockerfile: docker/mysql/Dockerfile
restart: "always"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uelfen", "-pelfen"]
interval: 10s
timeout: 5s
retries: 3
volumes:
- ./data/mysql:/var/lib/mysql
rabbitmq:
build: docker/rabbitmq/
hostname: "elfen_rabbitmq"
restart: "always"
healthcheck:
test: ["CMD-SHELL", "rabbitmq-diagnostics -q ping"]
interval: 10s
timeout: 5s
retries: 3
volumes:
- ./data/rabbitmq:/var/lib/rabbitmq
depends_on:
- postgres
- mysql
elfen:
build:
context: .
dockerfile: docker/elfen/Dockerfile
image: elfen_image
celery_submission_worker:
image: elfen_image
command: celery -A ELFEN worker -l INFO -Q submission -n submission_analysis_worker --heartbeat-interval=30 --without-gossip --without-mingle
restart: "always"
volumes:
- ./media/web:/elfen/media/web
depends_on:
rabbitmq:
condition: service_healthy
celery_static_analysis_worker:
image: elfen_image
command: celery -A ELFEN worker -l INFO -Q static_analysis -n static_analysis_worker --heartbeat-interval=30 --without-gossip --without-mingle
restart: "always"
volumes:
- ./media/web:/elfen/media/web
depends_on:
rabbitmq:
condition: service_healthy
celery_dynamic_analysis_worker:
image: elfen_image
command: celery -A ELFEN worker -c 4 -l INFO -Q dynamic_analysis -n dynamic_analysis_worker --heartbeat-interval=120 --without-gossip --without-mingle
restart: "always"
privileged: True
volumes:
- ./media/web:/elfen/media/web
depends_on:
rabbitmq:
condition: service_healthy
celery_network_analysis_worker:
image: elfen_image
command: celery -A ELFEN worker -l INFO -Q network_analysis -n network_analysis_worker --heartbeat-interval=120 --without-gossip --without-mingle
restart: "always"
privileged: True
volumes:
- ./media/web:/elfen/media/web
depends_on:
rabbitmq:
condition: service_healthy
celery_detection_analysis_worker:
image: elfen_image
command: celery -A ELFEN worker -l INFO -Q detection_analysis -n detection_analysis_worker --heartbeat-interval=120 --without-gossip --without-mingle
restart: "always"
privileged: True
volumes:
- ./media/web:/elfen/media/web
depends_on:
rabbitmq:
condition: service_healthy
celery_periodic_analysis_worker:
image: elfen_image
command: celery -A ELFEN worker --beat -l INFO -Q periodic_analysis -n periodic_analysis_worker --heartbeat-interval=120 --without-gossip --without-mingle
restart: "always"
privileged: True
volumes:
- ./media/web:/elfen/media/web
depends_on:
rabbitmq:
condition: service_healthy
flower:
image: elfen_image
command: celery -A ELFEN flower -l INFO
ports:
- "5555:5555"
depends_on:
- celery_submission_worker
- celery_static_analysis_worker
- celery_dynamic_analysis_worker
- celery_detection_analysis_worker
web:
image: elfen_image
command: docker/elfen/start.sh
restart: "always"
ports:
- "8000:8000"
volumes:
- .:/elfen
depends_on:
postgres:
condition: service_healthy
mysql:
condition: service_healthy
rabbitmq:
condition: service_healthy
celery_submission_worker:
condition: service_started
celery_static_analysis_worker:
condition: service_started
celery_dynamic_analysis_worker:
condition: service_started
celery_detection_analysis_worker:
condition: service_started
flower:
condition: service_started