-
Notifications
You must be signed in to change notification settings - Fork 37
/
docker-compose.stack.yml
142 lines (138 loc) · 3.2 KB
/
docker-compose.stack.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
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
version: "3.7"
x-custom:
shared_image: &shared_image
image: pavouk0/postgres-xl:XL_10_R1_1-313-g31dfe47
services:
db-gtm-1:
<<: *shared_image
environment:
- PG_HOST=0.0.0.0
- PG_NODE=gtm_1
- PG_PORT=6666
command: docker-cmd-gtm
entrypoint: docker-entrypoint-gtm
volumes:
- db-gtm-1:/var/lib/postgresql
networks:
- db_a
healthcheck:
test: ["CMD", "docker-healthcheck-gtm"]
interval: 30s
timeout: 30s
start_period: 0s
retries: 3
# deploy:
# placement:
# constraints:
# - node.labels.grp == dbxl # assumes shared volume storage, or 1-node
db-coord-1:
<<: *shared_image
environment:
- PG_GTM_HOST=db-gtm-1
- PG_GTM_PORT=6666
- PG_HOST=0.0.0.0
- PG_NODE=coord_1
- PG_PORT=5432
command: docker-cmd-coord
entrypoint: docker-entrypoint-coord
volumes:
- db-coord-1:/var/lib/postgresql
networks:
- db_a
- db_b
healthcheck:
test: ["CMD", "docker-healthcheck-coord"]
interval: 30s
timeout: 30s
start_period: 0s
retries: 3
# deploy:
# placement:
# constraints:
# - node.labels.grp == dbxl # assumes shared volume storage, or 1-node
db-coord-2:
<<: *shared_image
environment:
- PG_GTM_HOST=db-gtm-1
- PG_GTM_PORT=6666
- PG_HOST=0.0.0.0
- PG_NODE=coord_2
- PG_PORT=5432
command: docker-cmd-coord
entrypoint: docker-entrypoint-coord
volumes:
- db-coord-2:/var/lib/postgresql
networks:
- db_a
- db_b
healthcheck:
test: ["CMD", "docker-healthcheck-coord"]
interval: 30s
timeout: 30s
start_period: 0s
retries: 3
# deploy:
# placement:
# constraints:
# - node.labels.grp == dbxl # assumes shared volume storage, or 1-node
db-data-1:
<<: *shared_image
environment:
- PG_GTM_HOST=db-gtm-1
- PG_GTM_PORT=6666
- PG_HOST=0.0.0.0
- PG_NODE=data_1
- PG_PORT=5432
command: docker-cmd-data
entrypoint: docker-entrypoint-data
volumes:
- db-data-1:/var/lib/postgresql
networks:
- db_a
healthcheck:
test: ["CMD", "docker-healthcheck-data"]
interval: 30s
timeout: 30s
start_period: 0s
retries: 3
# deploy:
# placement:
# constraints:
# - node.labels.grp == dbxl # assumes shared volume storage, or 1-node
db-data-2:
<<: *shared_image
environment:
- PG_GTM_HOST=db-gtm-1
- PG_GTM_PORT=6666
- PG_HOST=0.0.0.0
- PG_NODE=data_2
- PG_PORT=5432
command: docker-cmd-data
entrypoint: docker-entrypoint-data
volumes:
- db-data-2:/var/lib/postgresql
networks:
- db_a
healthcheck:
test: ["CMD", "docker-healthcheck-data"]
interval: 30s
timeout: 30s
start_period: 0s
retries: 3
# deploy:
# placement:
# constraints:
# - node.labels.grp == dbxl # assumes shared volume storage, or 1-node
volumes:
db-gtm-1: {}
db-coord-1: {}
db-coord-2: {}
db-data-1: {}
db-data-2: {}
networks:
db_a:
driver: overlay
internal: true
db_b:
driver: overlay
internal: true