-
Notifications
You must be signed in to change notification settings - Fork 198
Expand file tree
/
Copy pathancillary-docker-compose.yml
More file actions
executable file
·240 lines (226 loc) · 6.52 KB
/
Copy pathancillary-docker-compose.yml
File metadata and controls
executable file
·240 lines (226 loc) · 6.52 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
name: peerdb-ancillary-services
# Shared postgres entrypoint enabling TLS with test certs present in the repository
x-postgres-entrypoint: &postgres-entrypoint
- sh
- -c
- |
set -e
SRC=/etc/postgresql/certs
DST=/run/pgssl
mkdir -p "$$DST"
install -m 644 -o postgres -g postgres "$$SRC/server.crt" "$$DST/server.crt"
install -m 600 -o postgres -g postgres "$$SRC/server.key" "$$DST/server.key"
exec docker-entrypoint.sh postgres \
-c ssl=on \
-c ssl_cert_file=$$DST/server.crt \
-c ssl_key_file=$$DST/server.key
services:
mongodb:
container_name: peerdb-mongodb
image: ${MONGODB_IMAGE}
entrypoint: ["bash", "-c", "openssl rand -base64 756 > /data/mongo.key && chmod 400 /data/mongo.key && exec mongod --replSet rs0 --oplogMinRetentionHours 24 --bind_ip_all --keyFile /data/mongo.key"]
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: ${CI_MONGO_ADMIN_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${CI_MONGO_ADMIN_PASSWORD}
volumes:
- mongo_data:/data/db
ports:
- "${CI_MONGO_PORT}:27017"
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.runCommand({ ping: 1 })"]
interval: 2s
timeout: 10s
retries: 5
clickhouse:
container_name: peerdb-clickhouse
image: ${CLICKHOUSE_IMAGE}
restart: unless-stopped
ports:
- "${CI_CLICKHOUSE_HTTP_PORT}:8123"
- "${CI_CLICKHOUSE_NATIVE_PORT}:9000"
volumes:
- clickhouse_data:/var/lib/clickhouse/
ulimits:
nofile:
soft: 262144
hard: 262144
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"]
interval: 2s
timeout: 10s
retries: 5
mysql-gtid:
container_name: peerdb-mysql-gtid
image: mysql:9.5
command:
- "--binlog-row-metadata=FULL"
restart: unless-stopped
volumes:
- mysql_gtid_data:/var/lib/mysql
ports:
- "${CI_MYSQL_GTID_PORT}:3306"
environment:
MYSQL_ROOT_PASSWORD: ${CI_MYSQL_ROOT_PASSWORD}
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 2s
timeout: 10s
retries: 5
mysql-pos:
container_name: peerdb-mysql-pos
image: biarms/mysql:5.7
command: ["--log_bin=mysql-bin", "--server-id=1", "--bind-address=::"]
restart: unless-stopped
volumes:
- mysql_pos_data:/var/lib/mysql
ports:
- "${CI_MYSQL_POS_PORT}:3306"
environment:
MYSQL_ROOT_PASSWORD: ${CI_MYSQL_ROOT_PASSWORD}
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-p${CI_MYSQL_ROOT_PASSWORD}"]
interval: 2s
timeout: 10s
retries: 5
mariadb:
container_name: peerdb-mariadb
image: mariadb:lts-ubi9@sha256:55a81b2d791d2ff8ad33fef413d9e45e0ac57a951127e0cfc69a8e59f922ba6e
command:
- "--log-bin=maria"
- "--binlog-format=ROW"
- "--binlog-row-metadata=FULL"
restart: unless-stopped
volumes:
- mariadb_data:/var/lib/mysql
ports:
- "${CI_MARIADB_PORT}:3306"
environment:
MARIADB_ROOT_PASSWORD: ${CI_MARIADB_ROOT_PASSWORD}
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-uroot", "-p${CI_MARIADB_ROOT_PASSWORD}"]
interval: 2s
timeout: 10s
retries: 5
postgres:
container_name: peerdb-postgres
image: ${POSTGRES_IMAGE}
restart: unless-stopped
volumes:
- postgres_data:/var/lib/postgresql/data
- ./volumes/pg-tls:/etc/postgresql/certs:ro
ports:
- "${PG_PORT}:5432"
environment:
PGUSER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PASSWORD}
POSTGRES_DB: ${PG_DATABASE}
POSTGRES_INITDB_ARGS: --locale=C.UTF-8
entrypoint: *postgres-entrypoint
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "pg_isready"]
interval: 2s
timeout: 10s
retries: 5
postgres2:
container_name: peerdb-postgres2
image: ${POSTGRES_IMAGE}
restart: unless-stopped
volumes:
- postgres2_data:/var/lib/postgresql/data
- ./volumes/pg-tls:/etc/postgresql/certs:ro
ports:
- "${PG2_PORT}:5432"
environment:
PGUSER: ${PG2_USER}
POSTGRES_PASSWORD: ${PG2_PASSWORD}
POSTGRES_DB: ${PG2_DATABASE}
POSTGRES_INITDB_ARGS: --locale=C.UTF-8
entrypoint: *postgres-entrypoint
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "pg_isready"]
interval: 2s
timeout: 10s
retries: 5
dozzle:
container_name: dozzle-compose-monitor
image: amir20/dozzle:latest
restart: unless-stopped
ports:
- "8118:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
toxiproxy:
container_name: peerdb-test-toxiproxy
# Same image as CI flow
image: ghcr.io/shopify/toxiproxy:2.12.0@sha256:9378ed52a28bc50edc1350f936f518f31fa95f0d15917d6eb40b8e376d1a214e
restart: unless-stopped
ports:
- 18474:8474
- 9902:9902
- 9904:9904
- 9903:9903
- 10001:10001
- 12001:12001
- 12002:12002
- 12003:12003
- 12004:12004
- 12005:12005
- 14001:14001
- 14002:14002
- 14003:14003
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "/toxiproxy-cli", "list"]
interval: 2s
timeout: 10s
retries: 5
openssh:
container_name: peerdb-test-ssh
# Same image as CI flow
image: linuxserver/openssh-server:latest@sha256:57c13941ef385d735cca18ee969eeba18e42ab95480c97af2182505aacdfe307
restart: unless-stopped
ports:
- "2222:2222"
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- USER_NAME=testuser
- USER_PASSWORD=testpass
- PASSWORD_ACCESS=true
- DOCKER_MODS=linuxserver/mods:openssh-server-ssh-tunnel
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "2222"]
interval: 2s
timeout: 10s
retries: 5
volumes:
postgres_data:
postgres2_data:
clickhouse_data:
mongo_data:
mysql_gtid_data:
mysql_pos_data:
mariadb_data:
networks:
default:
name: peerdb_network_${DEFAULT_TILT_PORT:-default}
external: true