-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
71 lines (67 loc) · 2.12 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
71 lines (67 loc) · 2.12 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
services:
master:
image: volga:latest
command: ["volga-master"]
ports:
- "50051:50051"
volumes:
- "./docker/pipeline_spec.demo.json:/app/pipeline-spec.json:ro"
environment:
VOLGA_MASTER_BIND_ADDR: "0.0.0.0:50051"
VOLGA_MASTER_HOLD_ON_FINISH: "false"
VOLGA_PIPELINE_ID: "docker-compose-demo"
VOLGA_WORKER_COUNT: "3"
VOLGA_WORKER_HOST_PREFIX: "worker-"
VOLGA_WORKER_PORT: "50052"
VOLGA_WORKER_TRANSPORT_PORT: "60052"
VOLGA_PIPELINE_SPEC_PATH: "/app/pipeline-spec.json"
worker-0:
image: volga:latest
command: ["volga-worker"]
depends_on: ["master"]
environment:
VOLGA_WORKER_BIND_ADDR: "0.0.0.0:50052"
VOLGA_MASTER_SERVICE_ADDR: "master:50051"
VOLGA_WORKER_HOLD_ON_FINISH: "false"
VOLGA_WORKER_HOST_PREFIX: "worker-"
VOLGA_WORKER_INDEX: "0"
worker-1:
image: volga:latest
command: ["volga-worker"]
depends_on: ["master"]
environment:
VOLGA_WORKER_BIND_ADDR: "0.0.0.0:50052"
VOLGA_MASTER_SERVICE_ADDR: "master:50051"
VOLGA_WORKER_HOLD_ON_FINISH: "false"
VOLGA_WORKER_HOST_PREFIX: "worker-"
VOLGA_WORKER_INDEX: "1"
worker-2:
image: volga:latest
command: ["volga-worker"]
depends_on: ["master"]
environment:
VOLGA_WORKER_BIND_ADDR: "0.0.0.0:50052"
VOLGA_MASTER_SERVICE_ADDR: "master:50051"
VOLGA_WORKER_HOLD_ON_FINISH: "false"
VOLGA_WORKER_HOST_PREFIX: "worker-"
VOLGA_WORKER_INDEX: "2"
storage:
image: volga:latest
command:
- /bin/sh
- -lc
- |
# Keep storage alive while master is running so plain `docker compose up`
# exits naturally after master finishes.
/usr/local/bin/volga-test-storage &
storage_pid="$$!"
if [ -z "$$storage_pid" ]; then
echo "failed to start volga-test-storage"
exit 1
fi
until getent hosts master >/dev/null 2>&1; do sleep 1; done
while getent hosts master >/dev/null 2>&1; do sleep 1; done
kill -TERM "$$storage_pid" || true
wait "$$storage_pid" || true
ports:
- "50071:50071"