-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker-compose.yml
58 lines (53 loc) · 1.25 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
version: '3.8'
services:
db:
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: construction_hazard_detection
MYSQL_USER: user
MYSQL_PASSWORD: passcode
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 20s
retries: 5
model-server:
build: .
command: gunicorn -w 1 -b 0.0.0.0:8000 "examples.Model-Server.app:app"
volumes:
- .:/app
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
stream-web:
build: .
command: gunicorn -w 1 -b 0.0.0.0:8001 "examples.Stream-Web.app:app"
volumes:
- .:/app
ports:
- "8001:8001"
depends_on:
db:
condition: service_healthy
main-application:
build: .
command: /bin/bash -c "python src/model_fetcher.py && python main.py --config ${CONFIG_PATH}"
volumes:
- .:/app
- ${CONFIG_PATH}:/app/config/configuration.json
depends_on:
db:
condition: service_healthy
model-server:
condition: service_started
stream-web:
condition: service_started
volumes:
db_data: