-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
43 lines (41 loc) · 1006 Bytes
/
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
version: '3'
services:
master:
build: ./backend/master
container_name: master
command: ["sh", "-c", "python3 main.py"]
environment:
- ROLE=master
- FLASK_DEBUG=1
volumes:
- ./backend:/backend/master
ports:
- 8080:8080
secondary1:
build: ./backend/secondary
container_name: secondary1
command: ["sh", "-c", "python3 main.py"]
environment:
- ROLE=secondary
- MASTER_HOST=http://master:8080
- FLASK_DEBUG=1
volumes:
- ./backend:/backend/secondary
depends_on:
- master
ports:
- 8001:8000
secondary2:
build: ./backend/secondary
container_name: secondary2
command: ["sh", "-c", "python3 main.py"]
environment:
- ROLE=secondary
- MASTER_HOST=http://master:8080
- FLASK_DEBUG=1
volumes:
- ./backend:/backend/secondary
depends_on:
- master
ports:
- 8002:8000