-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
57 lines (57 loc) · 1.45 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
---
services:
msg_postgres:
image: "postgres:15"
container_name: dispatch_postgres
environment:
POSTGRES_DB: dispatch_db
POSTGRES_USER: dispatch
POSTGRES_PASSWORD: dispatching
healthcheck:
test: ["CMD", "pg_isready", "-U", "dispatch", "-d", "dispatch_db"]
interval: 1s
timeout: 5s
retries: 20
ports:
- "55777:5432"
dispatcherd1:
container_name: dispatcherd1
working_dir: /dispatcherd
build:
context: .
dockerfile: tools/demo/Dockerfile
environment:
PATH: /dispatcherd/venv/bin:$PATH
PYTHONPATH: .
DISPATCHERD_CONFIG_FILE: /dispatcherd/dispatcher1.yml
command: dispatcherd
depends_on:
msg_postgres:
condition: service_healthy
volumes:
- "./:/dispatcherd/src"
healthcheck:
test: ["CMD", "dispatcherctl", "alive", "--expected-replies=2"]
interval: 1s
timeout: 5s
retries: 5
dispatcherd2:
container_name: dispatcherd2
build:
context: .
dockerfile: tools/demo/Dockerfile
environment:
PATH: /dispatcherd/venv/bin:$PATH
PYTHONPATH: .
DISPATCHERD_CONFIG_FILE: /dispatcherd/dispatcher2.yml
command: dispatcherd
depends_on:
msg_postgres:
condition: service_healthy
volumes:
- "./:/dispatcherd/src"
healthcheck:
test: ["CMD", "dispatcherctl", "alive", "--expected-replies=2"]
interval: 1s
timeout: 5s
retries: 5