-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
90 lines (84 loc) · 1.79 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
# usage:
# (sudo) docker-compose up -d
# (sudo) docker-compose down
services:
mongodb:
image: mongo:4.4.22
container_name: bonsai_mongodb
ports:
- "27017:27017"
expose:
- "27017"
networks:
- bonsai-net
redis:
image: redis:7.0.10
networks:
- bonsai-net
api:
container_name: api
build:
context: api
network: host
depends_on:
- mongodb
- minhash_service
- allele_cluster_service
ports:
- "8001:8000"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8000/"]
interval: 10s
retries: 3
start_period: 30s
timeout: 10s
environment:
- ALLOWED_ORIGINS=["*"]
- DB_HOST=mongodb
networks:
- bonsai-net
command: "uvicorn bonsai_api.main:app --reload --log-level debug --host 0.0.0.0"
frontend:
container_name: frontend
build:
context: frontend
network: host
depends_on:
api:
condition: service_healthy
restart: true
ports:
- "8000:5000"
volumes:
- "./frontend/bonsai_app:/home/worker/app/bonsai_app"
environment:
- FLASK_APP=bonsai_app.app:create_app
- FLASK_ENV=development
networks:
- bonsai-net
command: "flask run --reload --debug --host 0.0.0.0"
minhash_service:
container_name: minhash_service
build:
context: minhash_service
network: host
depends_on:
- redis
networks:
- bonsai-net
allele_cluster_service:
container_name: allele_cluster_service
build:
context: allele_cluster_service
network: host
depends_on:
- redis
networks:
- bonsai-net
networks:
bonsai-net:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.0.20.0/24