-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
33 lines (30 loc) · 922 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
version: '3'
# TODO make server address obsolete: if not specified, use node-id
# TODO may use string interpolation to insert service id into the commands?
services:
n1:
build:
context: ./
dockerfile: Dockerfile
image: raft-log-replication-demo:latest
command: --node-id=n1 --server.address=n1 --storage=/raft-demo --peers=n1:9999,n2:9999,n3:9999
ports:
- "8080:8000"
#env_file: # TODO
# - ./.env
n2:
build:
context: ./
dockerfile: Dockerfile
image: raft-log-replication-demo:latest
command: --node-id=n2 --server.address=n2 --storage=/raft-demo --peers=n1:9999,n2:9999,n3:9999
ports:
- "8081:8000"
n3:
build:
context: ./
dockerfile: Dockerfile
image: raft-log-replication-demo:latest
command: --node-id=n3 --server.address=n3 --storage=/raft-demo --peers=n1:9999,n2:9999,n3:9999
ports:
- "8082:8000"