@@ -22,8 +22,13 @@ services:
2222 REPMGR_PRIMARY_HOST : ${REPMGR_PRIMARY_HOST}
2323 REPMGR_PARTNER_NODES : ${REPMGR_PARTNER_NODES}
2424 POSTGRESQL_POSTGRES_PASSWORD : ${HAPI_POSTGRES_PASSWORD}
25+ REPMGR_FAILOVER : ${HF_POSTGRES_FAILOVER}
26+ REPMGR_DEGRADED_MONITORING_TIMEOUT : ${HF_POSTGRES_DEGRADED_MONITORING_TIMEOUT}
2527 volumes :
2628 - ' hapi-postgres-2-data:/bitnami/postgresql'
29+ configs :
30+ - target : /bitnami/postgresql/conf/conf.d/custom_postgresql.conf
31+ source : postgresql.conf
2732 deploy :
2833 placement :
2934 constraints :
@@ -53,8 +58,13 @@ services:
5358 REPMGR_PRIMARY_HOST : ${REPMGR_PRIMARY_HOST}
5459 REPMGR_PARTNER_NODES : ${REPMGR_PARTNER_NODES}
5560 POSTGRESQL_POSTGRES_PASSWORD : ${HAPI_POSTGRES_PASSWORD}
61+ REPMGR_FAILOVER : ${HF_POSTGRES_FAILOVER}
62+ REPMGR_DEGRADED_MONITORING_TIMEOUT : ${HF_POSTGRES_DEGRADED_MONITORING_TIMEOUT}
5663 volumes :
5764 - ' hapi-postgres-3-data:/bitnami/postgresql'
65+ configs :
66+ - target : /bitnami/postgresql/conf/conf.d/custom_postgresql.conf
67+ source : postgresql.conf
5868 deploy :
5969 placement :
6070 constraints :
@@ -71,130 +81,6 @@ services:
7181 default :
7282 pg_backup_net :
7383
74- pgpool-1 :
75- image : bitnami/pgpool:4.4.3
76- deploy :
77- placement :
78- max_replicas_per_node : 1
79- resources :
80- limits :
81- cpus : ${HF_PGPOOL_CPU_LIMIT}
82- memory : ${HF_PGPOOL_MEMORY_LIMIT}
83- reservations :
84- cpus : ${HF_PGPOOL_CPU_RESERVE}
85- memory : ${HF_PGPOOL_MEMORY_RESERVE}
86- configs :
87- - target : /config/custom_pgpool.conf
88- source : pgpool.conf
89- - target : /opt/bitnami/pgpool/conf/pgpool_node_id
90- source : pgpool_node_id0.conf
91- environment :
92- PGPOOL_BACKEND_NODES : ${HF_PGPOOL_NODES}
93- PGPOOL_BACKEND_APPLICATION_NAMES : ${REPMGR_PARTNER_NODES}
94- PGPOOL_SR_CHECK_USER : postgres
95- PGPOOL_SR_CHECK_PASSWORD : ${HAPI_POSTGRES_PASSWORD}
96- PGPOOL_POSTGRES_USERNAME : postgres
97- PGPOOL_POSTGRES_PASSWORD : ${HAPI_POSTGRES_PASSWORD}
98- PGPOOL_ADMIN_USERNAME : ${HF_PGPOOL_USERNAME}
99- PGPOOL_ADMIN_PASSWORD : ${HF_PGPOOL_PASSWORD}
100- PGPOOL_POSTGRES_CUSTOM_USERS : ${HF_POSTGRESQL_USERNAME}
101- PGPOOL_POSTGRES_CUSTOM_PASSWORDS : ${HF_POSTGRESQL_PASSWORD}
102- PGPOOL_ENABLE_LOAD_BALANCING : " no"
103- PGPOOL_AUTO_FAILBACK : " yes"
104- PGPOOL_USER_CONF_FILE : " /config/custom_pgpool.conf"
105- networks :
106- default :
107-
108- pgpool-2 :
109- image : bitnami/pgpool:4.4.3
110- deploy :
111- placement :
112- max_replicas_per_node : 1
113- resources :
114- limits :
115- cpus : ${HF_PGPOOL_CPU_LIMIT}
116- memory : ${HF_PGPOOL_MEMORY_LIMIT}
117- reservations :
118- cpus : ${HF_PGPOOL_CPU_RESERVE}
119- memory : ${HF_PGPOOL_MEMORY_RESERVE}
120- configs :
121- - target : /config/custom_pgpool.conf
122- source : pgpool.conf
123- - target : /opt/bitnami/pgpool/conf/pgpool_node_id
124- source : pgpool_node_id1.conf
125- environment :
126- PGPOOL_BACKEND_NODES : ${HF_PGPOOL_NODES}
127- PGPOOL_BACKEND_APPLICATION_NAMES : ${REPMGR_PARTNER_NODES}
128- PGPOOL_SR_CHECK_USER : postgres
129- PGPOOL_SR_CHECK_PASSWORD : ${HAPI_POSTGRES_PASSWORD}
130- PGPOOL_POSTGRES_USERNAME : postgres
131- PGPOOL_POSTGRES_PASSWORD : ${HAPI_POSTGRES_PASSWORD}
132- PGPOOL_ADMIN_USERNAME : ${HF_PGPOOL_USERNAME}
133- PGPOOL_ADMIN_PASSWORD : ${HF_PGPOOL_PASSWORD}
134- PGPOOL_POSTGRES_CUSTOM_USERS : ${HF_POSTGRESQL_USERNAME}
135- PGPOOL_POSTGRES_CUSTOM_PASSWORDS : ${HF_POSTGRESQL_PASSWORD}
136- PGPOOL_ENABLE_LOAD_BALANCING : " no"
137- PGPOOL_AUTO_FAILBACK : " yes"
138- PGPOOL_USER_CONF_FILE : " /config/custom_pgpool.conf"
139- networks :
140- default :
141-
142- pgpool-3 :
143- image : bitnami/pgpool:4.4.3
144- deploy :
145- placement :
146- max_replicas_per_node : 1
147- resources :
148- limits :
149- cpus : ${HF_PGPOOL_CPU_LIMIT}
150- memory : ${HF_PGPOOL_MEMORY_LIMIT}
151- reservations :
152- cpus : ${HF_PGPOOL_CPU_RESERVE}
153- memory : ${HF_PGPOOL_MEMORY_RESERVE}
154- configs :
155- - target : /config/custom_pgpool.conf
156- source : pgpool.conf
157- - target : /opt/bitnami/pgpool/conf/pgpool_node_id
158- source : pgpool_node_id2.conf
159- environment :
160- PGPOOL_BACKEND_NODES : ${HF_PGPOOL_NODES}
161- PGPOOL_BACKEND_APPLICATION_NAMES : ${REPMGR_PARTNER_NODES}
162- PGPOOL_SR_CHECK_USER : postgres
163- PGPOOL_SR_CHECK_PASSWORD : ${HAPI_POSTGRES_PASSWORD}
164- PGPOOL_POSTGRES_USERNAME : postgres
165- PGPOOL_POSTGRES_PASSWORD : ${HAPI_POSTGRES_PASSWORD}
166- PGPOOL_ADMIN_USERNAME : ${HF_PGPOOL_USERNAME}
167- PGPOOL_ADMIN_PASSWORD : ${HF_PGPOOL_PASSWORD}
168- PGPOOL_POSTGRES_CUSTOM_USERS : ${HF_POSTGRESQL_USERNAME}
169- PGPOOL_POSTGRES_CUSTOM_PASSWORDS : ${HF_POSTGRESQL_PASSWORD}
170- PGPOOL_ENABLE_LOAD_BALANCING : " no"
171- PGPOOL_AUTO_FAILBACK : " yes"
172- PGPOOL_USER_CONF_FILE : " /config/custom_pgpool.conf"
173- networks :
174- default :
175-
176- configs :
177- pgpool.conf :
178- name : pgpool_conf-${pgpool_conf_DIGEST:?err}
179- file : ./config/custom_pgpool.conf
180- labels :
181- name : hapi-fhir
182- pgpool_node_id0.conf :
183- name : pgpool_node_id0-${pgpool_node_id0_DIGEST:?err}
184- file : ./config/pgpool_node_id0
185- labels :
186- name : hapi-fhir
187- pgpool_node_id1.conf :
188- name : pgpool_node_id1-${pgpool_node_id1_DIGEST:?err}
189- file : ./config/pgpool_node_id1
190- labels :
191- name : hapi-fhir
192- pgpool_node_id2.conf :
193- name : pgpool_node_id2-${pgpool_node_id2_DIGEST:?err}
194- file : ./config/pgpool_node_id2
195- labels :
196- name : hapi-fhir
197-
19884volumes :
19985 hapi-postgres-2-data :
20086 hapi-postgres-3-data :
0 commit comments