-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.cluster.yml
More file actions
56 lines (52 loc) · 1.75 KB
/
Copy pathdocker-compose.cluster.yml
File metadata and controls
56 lines (52 loc) · 1.75 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
# Cardinal — 3-node cluster.
#
# Three carded engines (each with its own socket + WAL on a shared volume) and
# one cardinal coordinator routing with replication factor 2 / write quorum 2.
# Bring up with: docker compose -f docker-compose.cluster.yml up --build
services:
carde-0:
build: ./engine
entrypoint: ["/usr/local/bin/carded", "--socket", "/run/carde/carde-0.sock", "--wal", "/run/carde/carde-0.wal"]
volumes: [carde-run:/run/carde]
healthcheck:
test: ["CMD", "test", "-S", "/run/carde/carde-0.sock"]
interval: 2s
timeout: 2s
retries: 15
carde-1:
build: ./engine
entrypoint: ["/usr/local/bin/carded", "--socket", "/run/carde/carde-1.sock", "--wal", "/run/carde/carde-1.wal"]
volumes: [carde-run:/run/carde]
healthcheck:
test: ["CMD", "test", "-S", "/run/carde/carde-1.sock"]
interval: 2s
timeout: 2s
retries: 15
carde-2:
build: ./engine
entrypoint: ["/usr/local/bin/carded", "--socket", "/run/carde/carde-2.sock", "--wal", "/run/carde/carde-2.wal"]
volumes: [carde-run:/run/carde]
healthcheck:
test: ["CMD", "test", "-S", "/run/carde/carde-2.sock"]
interval: 2s
timeout: 2s
retries: 15
cardinal:
build: ./control
depends_on:
carde-0: {condition: service_healthy}
carde-1: {condition: service_healthy}
carde-2: {condition: service_healthy}
ports: ["8080:8080"]
volumes: [carde-run:/run/carde]
entrypoint:
- "/usr/local/bin/cardinal"
- "--listen=:8080"
- "--peer=node-0=/run/carde/carde-0.sock"
- "--peer=node-1=/run/carde/carde-1.sock"
- "--peer=node-2=/run/carde/carde-2.sock"
- "--rf=2"
- "--write-quorum=2"
- "--read-consistency=quorum"
volumes:
carde-run: