-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (58 loc) · 1.57 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
# distributed algorithms, n.dulay, 2 feb 18
# coursework 2 - paxos made moderately complex
# docker-compose.yml v1
version: "3.4"
x-common:
&defaults
image: elixir:alpine
volumes:
- .:/project
working_dir: /project
networks:
- network
networks:
network:
driver: bridge
services:
paxos.localdomain:
container_name: paxos
command: >
elixir --name paxos@paxos.localdomain --cookie pass
-S mix run --no-halt -e Paxos.main 1 docker 3 2
depends_on:
- server1.localdomain
- server2.localdomain
- server3.localdomain
- client1.localdomain
- client2.localdomain
<<: *defaults
server1.localdomain:
container_name: server1
command: >
elixir --name server1@server1.localdomain --cookie pass
-S mix run --no-halt
<<: *defaults
server2.localdomain:
container_name: server2
command: >
elixir --name server2@server2.localdomain --cookie pass
-S mix run --no-halt
<<: *defaults
server3.localdomain:
container_name: server3
command: >
elixir --name server3@server3.localdomain --cookie pass
-S mix run --no-halt
<<: *defaults
client1.localdomain:
container_name: client1
command: >
elixir --name client1@client1.localdomain --cookie pass
-S mix run --no-halt
<<: *defaults
client2.localdomain:
container_name: client2
command: >
elixir --name client2@client2.localdomain --cookie pass
-S mix run --no-halt
<<: *defaults