Skip to content

Commit 1648da9

Browse files
committed
docker-compose
1 parent 87d36c8 commit 1648da9

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

script/docker-compose.yaml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
version: '3'
2+
3+
networks:
4+
bitnet:
5+
6+
services:
7+
pg15-auto:
8+
image: "radondb/radondb-postgresql:15.0-v1.2.0"
9+
container_name: "pg15-auto"
10+
command: auto_failover
11+
restart: always
12+
environment:
13+
PG_MODE: monitor
14+
AUTOCTL_NODE_PASSWORD: postgres
15+
EXTERNAL_HOSTNAME: pg15-auto
16+
healthcheck:
17+
test: ["CMD", "pgtools", "-a"]
18+
interval: 10s
19+
timeout: 60s
20+
retries: 3
21+
start_period: 60s
22+
networks:
23+
- bitnet
24+
pg15-readwrite:
25+
image: "radondb/radondb-postgresql:15.0-v1.2.0"
26+
container_name: "pg15-readwrite"
27+
command: auto_failover
28+
restart: always
29+
depends_on:
30+
pg15-auto:
31+
condition: service_healthy
32+
healthcheck:
33+
test: ["CMD", "pgtools", "-a"]
34+
interval: 10s
35+
timeout: 10s
36+
retries: 3
37+
start_period: 60s
38+
ports:
39+
- "15433:5432"
40+
environment:
41+
PG_MODE: readwrite
42+
AUTOCTL_NODE_PASSWORD: postgres
43+
EXTERNAL_HOSTNAME: pg15-readwrite
44+
MONITOR_HOSTNAME: pg15-auto
45+
AUTOCTL_REPLICATOR_PASSWORD: postgres
46+
PG_CONFIG_port: 5432
47+
networks:
48+
- bitnet
49+
pg15-readonly:
50+
image: "radondb/radondb-postgresql:15.0-v1.2.0"
51+
container_name: "pg15-readonly"
52+
command: auto_failover
53+
restart: always
54+
depends_on:
55+
pg15-auto:
56+
condition: service_healthy
57+
pg15-readwrite:
58+
condition: service_healthy
59+
healthcheck:
60+
test: ["CMD", "pgtools", "-a"]
61+
interval: 10s
62+
timeout: 10s
63+
retries: 3
64+
start_period: 60s
65+
ports:
66+
- "15434:5432"
67+
environment:
68+
PG_MODE: readonly
69+
AUTOCTL_NODE_PASSWORD: postgres
70+
EXTERNAL_HOSTNAME: pg15-readonly
71+
MONITOR_HOSTNAME: pg15-auto
72+
AUTOCTL_REPLICATOR_PASSWORD: postgres
73+
PG_CONFIG_port: 5432
74+
PG_STREAMING: sync
75+
networks:
76+
- bitnet

0 commit comments

Comments
 (0)