-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
156 lines (144 loc) · 4.18 KB
/
docker-compose.yaml
File metadata and controls
156 lines (144 loc) · 4.18 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
services:
spqr-shard-image:
image: spqr-shard-image
build:
dockerfile: ./docker/shard/Dockerfile
context: .
spqr-base-image:
image: spqr-base-image
build:
dockerfile: ./docker/spqr/Dockerfile
context: .
spqr-base-image-debug:
image: spqr-base-image-debug
build:
dockerfile: ./docker/spqr/Dockerfile.debug
context: .
x-shard-common:
&shard-common
image: spqr-shard-image
healthcheck:
test: 'pg_isready -U postgres --dbname=postgres -p 6432'
interval: 10s
timeout: 5s
retries: 5
shard1:
<<: *shard-common
environment: &shard-env-common
POSTGRES_USER: user1
POSTGRES_DB: db1
ports:
- "7432:6432"
hostname: spqr_shard_1
container_name: spqr_shard_1
shard1-replica:
<<: *shard-common
environment:
<<: *shard-env-common
PG_MASTER: spqr_shard_1
ports:
- "7532:6432"
hostname: spqr_shard_1_replica
container_name: spqr_shard_1_replica
shard2:
<<: *shard-common
environment:
<<: *shard-env-common
ports:
- "7433:6432"
hostname: spqr_shard_2
container_name: spqr_shard_2
shard2-replica:
<<: *shard-common
environment:
<<: *shard-env-common
PG_MASTER: spqr_shard_2
ports:
- "7533:6432"
hostname: spqr_shard_2_replica
container_name: spqr_shard_2_replica
shard3:
<<: *shard-common
environment:
<<: *shard-env-common
ports:
- "7434:6432"
hostname: spqr_shard_3
container_name: spqr_shard_3
shard3-replica:
<<: *shard-common
environment:
<<: *shard-env-common
PG_MASTER: spqr_shard_3
ports:
- "7534:6432"
hostname: spqr_shard_3_replica
container_name: spqr_shard_3_replica
shard4:
<<: *shard-common
environment:
<<: *shard-env-common
ports:
- "7435:6432"
hostname: spqr_shard_4
container_name: spqr_shard_4
shard4-replica:
<<: *shard-common
environment:
<<: *shard-env-common
PG_MASTER: spqr_shard_4
ports:
- "7535:6432"
hostname: spqr_shard_4_replica
container_name: spqr_shard_4_replica
coordinator:
build:
dockerfile: ./docker/coordinator/Dockerfile
context: .
ports:
- "7002:7002"
- "7003:7003"
hostname: spqr_coordinator
container_name: spqr_coordinator
depends_on:
- qdb01
qdb01:
image: 'quay.io/coreos/etcd:v3.6.4'
container_name: spqr_qdb
hostname: spqr_qdb
environment:
ALLOW_NONE_AUTHENTICATION: "yes"
ETCD_LOG_LEVEL: "debug"
ports:
- "2379:2379"
entrypoint: ["/usr/local/bin/etcd", "--advertise-client-urls", "http://spqr_qdb:2379", "--listen-client-urls", "http://0.0.0.0:2379"]
router:
build:
dockerfile: ./docker/router/Dockerfile
context: .
ports:
- "8432:6432"
- "7013:7000"
hostname: spqr_router_1
container_name: spqr_router_1
environment:
- ROUTER_CONFIG=/spqr/docker/router/cfg.yaml
- COORDINATOR_CONFIG=/spqr/docker/coordinator/cfg.yaml
- ROUTER_LOG=/var/log/spqr-router.log
router2:
build:
dockerfile: ./docker/router/Dockerfile
context: .
ports:
- "8433:6432"
- "7023:7003"
hostname: spqr_router_2
container_name: spqr_router_2
environment:
- ROUTER_CONFIG=/spqr/docker/router/cfg2.yaml
- COORDINATOR_CONFIG=/spqr/docker/coordinator/cfg2.yaml
- ROUTER_LOG=/var/log/spqr-router.log
slicer:
build:
dockerfile: ./docker/slicer/Dockerfile
context: .