-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
67 lines (67 loc) · 1.55 KB
/
docker-compose.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
version: "2"
services:
pg_red:
hostname: pg_red
build: ./master
ports:
- "5445:5432"
volumes:
#- pg_red_data:/var/lib/postgresql/data
- shared_opt:/opt/pg_cluster
environment:
- POSTGRES_USER=wiwwo
- POSTGRES_PASSWORD=wiwwo123
- POSTGRES_DB=postgres
- PG_REP_USER=rep
- PG_REP_PASSWORD=wiwwo123
- WHOISTHIS=pg_red
networks:
- bridge-docker
restart: always
pg_green:
hostname: pg_green
build: ./slave
depends_on:
- pg_red
ports:
- "5446:5432"
volumes:
#- pg_green_data:/var/lib/postgresql/data
- shared_opt:/opt/pg_cluster
environment:
- POSTGRES_USER=wiwwo
- POSTGRES_PASSWORD=wiwwo123
- POSTGRES_DB=postgres
- PG_REP_USER=rep
- PG_REP_PASSWORD=wiwwo123
- WHOISTHIS=pg_green
networks:
- bridge-docker
restart: always
pg_blue:
hostname: pg_blue
build: ./slave
depends_on:
- pg_red
ports:
- "5447:5432"
volumes:
#- pg_blue_data:/var/lib/postgresql/data
- shared_opt:/opt/pg_cluster
environment:
- POSTGRES_USER=wiwwo
- POSTGRES_PASSWORD=wiwwo123
- POSTGRES_DB=postgres
- PG_REP_USER=rep
- PG_REP_PASSWORD=wiwwo123
- WHOISTHIS=pg_blue
networks:
- bridge-docker
restart: always
volumes:
#pg_red_data:
#pg_green_data:
#pg_blue_data:
shared_opt:
networks:
bridge-docker: