forked from saule1508/pgcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-nomanager.yml
70 lines (69 loc) · 2.26 KB
/
docker-compose-nomanager.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
version: '3'
services:
pg01:
image: pg:0.4.0
environment:
INITIAL_NODE_TYPE: master
NODE_ID: 1
NODE_NAME: pg01
MSLIST: "asset,ingest,playout"
# for each micro-service two db users are created, for ex. asset_owner and asset_user, etc.
MSOWNERPWDLIST: "asset_owner,ingest_owner,playout_owner"
MSUSERPWDLIST: "asset_user,ingest_user,playout_user"
REPMGRPWD: rep123
PGMASTER: pg01
ports:
- 15432:5432 # postgres port
volumes:
- pg01db:/u01/pg10/data
- pg01arc:/u02/archive
- pg01bu:/u02/backup
pg02:
image: pg:0.4.0
environment:
INITIAL_NODE_TYPE: slave
NODE_ID: 2
NODE_NAME: pg02
MSLIST: "asset,ingest,playout"
# for each micro-service two db users are created, for ex. asset_owner and asset_user, etc.
MSOWNERPWDLIST: "asset_owner,ingest_owner,playout_owner"
MSUSERPWDLIST: "asset_user,ingest_user,playout_user"
REPMGRPWD: rep123
PGMASTER: pg01
ports:
- 25432:5432 # postgres port
volumes:
- pg02db:/u01/pg10/data
- pg02arc:/u02/archive
- pg02bu:/u02/backup
depends_on:
- pg01
pgpool01:
image: pgpool:0.4.0
ports:
- 9999:9999
environment:
PGMASTER_NODE_NAME: pg01
PG_BACKEND_NODE_LIST: 0:pg01:5432:1:/u01/pg10/data:ALLOW_TO_FAILOVER,1:pg02:5432:1:/u01/pg10/data:ALLOW_TO_FAILOVER
# csv list of backend postgres databases, each backend db contains (separated by :)
# number (start with 0):host name:pgpool port (default 9999):data dir (default /u01/pg10/data):flag ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER
# not needed when there is a single postgres DB
PGP_NODE_NAME: pgpool01
REPMGRPWD: rep123
#DELEGATE_IP: 172.18.0.100
#TRUSTED_SERVERS: 172.23.1.250
#PGP_HEARTBEATS: "0:pgpool01:9694,1:pgpool02:9694"
#PGP_OTHERS: "0:pgpool02:9999"
# csv list of other pgpool nodes, each node contains (separated by :)
# number (start with 0):host name:pgpool port (default 9999)
# not needed when there is a single pgpool node
depends_on:
- pg01
- pg02
volumes:
pg01db:
pg02db:
pg01bu:
pg02bu:
pg01arc:
pg02arc: