-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose-postgres.yml
54 lines (50 loc) · 1.41 KB
/
docker-compose-postgres.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
version: "3.9"
services:
postgres-1:
image: ${POSTGRES_IMAGE}
environment:
POSTGRESQL_PASSWORD: ${POSTGRESQL_PASSWORD}
REPMGR_NODE_NETWORK_NAME: postgres-1
REPMGR_PASSWORD: ${REPMGR_PASSWORD}
REPMGR_RECONNECT_INTERVAL: 3
REPMGR_NODE_NAME: postgres-1
REPMGR_PRIMARY_HOST: ${REPMGR_PRIMARY_HOST}
REPMGR_PARTNER_NODES: ${REPMGR_PARTNER_NODES}
POSTGRESQL_POSTGRES_PASSWORD: ${POSTGRESQL_PASSWORD}
REPMGR_FAILOVER: ${POSTGRES_FAILOVER}
REPMGR_DEGRADED_MONITORING_TIMEOUT: ${POSTGRES_DEGRADED_MONITORING_TIMEOUT}
volumes:
- "hapi-postgres-1-data:/bitnami/postgresql"
configs:
- target: /bitnami/postgresql/conf/conf.d/custom_postgresql.conf
source: postgresql.conf
deploy:
replicas: ${POSTGRES_REPLICAS}
resources:
limits:
cpus: ${POSTGRES_CPU_LIMIT}
memory: ${POSTGRES_MEMORY_LIMIT}
reservations:
cpus: ${POSTGRES_CPU_RESERVE}
memory: ${POSTGRES_MEMORY_RESERVE}
networks:
default:
postgres:
pg_backup_net:
volumes:
hapi-postgres-1-data:
configs:
postgresql.conf:
name: postgresql_conf-${postgresql_conf_DIGEST:?err}
file: ./config/custom_postgresql.conf
labels:
name: postgres
networks:
default:
postgres:
name: postgres_public
external: true
pg_backup_net:
name: pg_backup
driver: overlay
attachable: true