-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (40 loc) · 1.08 KB
/
Copy pathdocker-compose.yml
File metadata and controls
45 lines (40 loc) · 1.08 KB
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
# Coordinator + three workers in separate containers.
# docker compose up --build
# Then from the host:
# ./scripts/client.sh submit sleep --milliseconds 30000
# docker compose kill worker-1 # watch the job get reassigned
# Job state persists in the named volume across coordinator restarts.
services:
coordinator:
build:
context: .
target: coordinator
ports:
- "7070:7070" # worker protocol
- "7071:7071" # client protocol
command: ["--database", "/data/coordinator.db"]
volumes:
- coordinator-data:/data
worker-1:
build:
context: .
target: worker
command: ["--coordinator-host", "coordinator", "--id", "worker-1"]
depends_on:
- coordinator
worker-2:
build:
context: .
target: worker
command: ["--coordinator-host", "coordinator", "--id", "worker-2"]
depends_on:
- coordinator
worker-3:
build:
context: .
target: worker
command: ["--coordinator-host", "coordinator", "--id", "worker-3"]
depends_on:
- coordinator
volumes:
coordinator-data: