forked from cristianprice/bitnami-docker-pgpool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-ldap.yml
78 lines (77 loc) · 2.27 KB
/
docker-compose-ldap.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
version: '2.1'
services:
pg-0:
image: docker.io/bitnami/postgresql-repmgr:11-debian-10
ports:
- 5432
volumes:
- pg_0_data:/bitnami/postgresql
environment:
- POSTGRESQL_POSTGRES_PASSWORD=adminpassword
- POSTGRESQL_USERNAME=customuser
- POSTGRESQL_PASSWORD=custompassword
- POSTGRESQL_DATABASE=customdatabase
- REPMGR_PASSWORD=repmgrpassword
- REPMGR_PRIMARY_HOST=pg-0
- REPMGR_PARTNER_NODES=pg-0,pg-1
- REPMGR_NODE_NAME=pg-0
- REPMGR_NODE_NETWORK_NAME=pg-0
- REPMGR_PGHBA_TRUST_ALL=yes
pg-1:
image: docker.io/bitnami/postgresql-repmgr:11-debian-10
ports:
- 5432
volumes:
- pg_1_data:/bitnami/postgresql
environment:
- POSTGRESQL_POSTGRES_PASSWORD=adminpassword
- POSTGRESQL_USERNAME=customuser
- POSTGRESQL_PASSWORD=custompassword
- POSTGRESQL_DATABASE=customdatabase
- REPMGR_PASSWORD=repmgrpassword
- REPMGR_PRIMARY_HOST=pg-0
- REPMGR_PARTNER_NODES=pg-0,pg-1
- REPMGR_NODE_NAME=pg-1
- REPMGR_NODE_NETWORK_NAME=pg-1
- REPMGR_PGHBA_TRUST_ALL=yes
pgpool:
image: docker.io/bitnami/pgpool:4-debian-10
ports:
- 5432:5432
environment:
- PGPOOL_BACKEND_NODES=0:pg-0:5432,1:pg-1:5432
- PGPOOL_SR_CHECK_USER=repmgr
- PGPOOL_SR_CHECK_PASSWORD=repmgrpassword
- PGPOOL_POSTGRES_USERNAME=postgres
- PGPOOL_POSTGRES_PASSWORD=adminpassword
- PGPOOL_ADMIN_USERNAME=admin
- PGPOOL_ADMIN_PASSWORD=adminpassword
- PGPOOL_ENABLE_LOAD_BALANCING=yes
- PGPOOL_ENABLE_LDAP=yes
- LDAP_URI=ldap://openldap:1389
- LDAP_BASE=dc=example,dc=org
- LDAP_BIND_DN=cn=admin,dc=example,dc=org
- LDAP_BIND_PASSWORD=adminpassword
healthcheck:
test: ["CMD", "/opt/bitnami/scripts/pgpool/healthcheck.sh"]
interval: 10s
timeout: 5s
retries: 5
openldap:
image: 'docker.io/bitnami/openldap:latest'
ports:
- '1389:1389'
environment:
- LDAP_ADMIN_USERNAME=admin
- LDAP_ADMIN_PASSWORD=adminpassword
- LDAP_USERS=customuser
- LDAP_PASSWORDS=custompassword
volumes:
- 'openldap_data:/bitnami/openldap'
volumes:
pg_0_data:
driver: local
pg_1_data:
driver: local
openldap_data:
driver: local