-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (40 loc) · 957 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.8'
services:
node:
build:
context: .
dockerfile: app.Dockerfile
environment:
- APP_NAME=node
- SCRIPT_LEADER_PATH=/app/script_leader.sh
- SCRIPT_FOLLOWER_PATH=/app/script_follower.sh
volumes:
- .:/app
command: uvicorn app.main:app --host 0.0.0.0 --port 80
deploy:
replicas: 3
networks:
- election_net
monitor: # loads a web page with an overview over all nodes
build:
context: .
dockerfile: monitor.Dockerfile
ports:
- 8000:8000
environment:
- RAFT_SERVICE_NAME=node
- BIND_HOST=localhost
- BIND_PORT=8000
- TEMPLATES_DIR=/app/monitor/templates/
- REFRESH_RATE_MILLIS=1000
volumes:
- .:/app
command: uvicorn monitor.main:app --host 0.0.0.0 --port 8000
networks:
- election_net
networks:
election_net:
ipam:
driver: default
config:
- subnet: 172.28.0.0/24