-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
94 lines (94 loc) · 2.02 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
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
version: '3'
services:
pg_pgpool:
build:
context: .
args:
- CERTUSERNAME=certuser
dockerfile: pg-pgpool.Dockerfile
image: pgsql-pgpool:10
container_name: pgsql-pgpool
privileged: true
volumes:
- ./:/docker
pgnode_master:
build:
context: .
args:
- ROLE=master
- MASTER_IP=172.22.0.50
dockerfile: ./pgnode.Dockerfile
image: pgnode/master:latest
container_name: pgmaster
hostname: pgmaster
privileged: true
depends_on:
- pg_pgpool
volumes:
- ./:/docker
networks:
app_net:
ipv4_address: 172.22.0.50
pgnode_slave:
build:
context: ./
args:
- ROLE=standby
- MASTER_IP=172.22.0.50
dockerfile: pgnode.Dockerfile
image: pgnode/slave:latest
container_name: pgslave
hostname: pgslave
privileged: true
depends_on:
- pgnode_master
- pg_pgpool
volumes:
- ./:/docker
networks:
app_net:
ipv4_address: 172.22.0.51
pgpoolnode:
build:
context: .
args:
- SLAVE_IP=172.22.0.51
- MASTER_IP=172.22.0.50
dockerfile: pgpoolnode.Dockerfile
image: pgpoolnode:latest
container_name: pgpoolnode
hostname: pgpoolnode
privileged: true
depends_on:
- pg_pgpool
- pgnode_master
- pgnode_slave
volumes:
- ./:/docker
networks:
app_net:
ipv4_address: 172.22.0.52
clientnode:
build:
context: .
dockerfile: clientnode.Dockerfile
image: clientnode:latest
container_name: clientnode
hostname: clientnode
privileged: true
depends_on:
- pg_pgpool
- pgnode_master
- pgnode_slave
- pgpoolnode
volumes:
- ./:/docker
networks:
app_net:
ipv4_address: 172.22.0.53
networks:
app_net:
driver: bridge
ipam:
config:
- subnet: 172.22.0.0/24