Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.5'
- networks:
- plannerix:
- name: plannerix
- external: true
- services:
- primary:
- hostname: 'primary'
- image: crunchydata/crunchy-postgres:centos7-9.6.11-2.2.0
- environment:
- - PGHOST=/tmp
- - MAX_CONNECTIONS=10
- - MAX_WAL_SENDERS=5
- - PG_MODE=primary
- - PG_PRIMARY_USER=primaryuser
- - PG_PRIMARY_PASSWORD=fRqz3vxPpGWSaFSdSGmC
- - PG_DATABASE=testdb
- - PG_USER=sye1zhudcauyoei
- - PG_PASSWORD=cUSC9f0FYSkT2iKWGdEjYXONcQVyYLrhrgpQIkFNCwQ1uFv7go4DU6vEo9iAYd
- - PG_ROOT_PASSWORD=Pje5SXan7qHa9LFL3nmYCUBgwR6EHtF6K4qKnvfd
- - PG_PRIMARY_PORT=5432
- volumes:
- - pg-primary-vol:/pgdata
- ports:
- - "5432"
- networks:
- - plannerix
- deploy:
- restart_policy:
- condition: on-failure
- delay: 10s
- max_attempts: 4
- window: 300s
- placement:
- constraints:
- - node.labels.type == db
- - node.labels.db == primary
- - node.labels.type != api
- - node.role == worker
- replica:
- image: crunchydata/crunchy-postgres:centos7-9.6.11-2.2.0
- environment:
- - PGHOST=/tmp
- - MAX_CONNECTIONS=10
- - MAX_WAL_SENDERS=5
- - PG_MODE=replica
- - PG_PRIMARY_HOST=primary
- - PG_PRIMARY_PORT=5432
- - PG_PRIMARY_USER=primaryuser
- - PG_PRIMARY_PASSWORD=fRqz3vxPpGWSaFSdSGmC
- - PG_DATABASE=testdb
- - PG_USER=testuser
- - PG_PASSWORD=password
- - PG_ROOT_PASSWORD=Pje5SXan7qHa9LFL3nmYCUBgwR6EHtF6K4qKnvfd
- volumes:
- - pg-replica-vol:/pgdata
- ports:
- - "5432"
- networks:
- - plannerix
- deploy:
- restart_policy:
- condition: on-failure
- delay: 10s
- max_attempts: 4
- window: 300s
- placement:
- constraints:
- - node.labels.type == db
- - node.labels.type != primary
- - node.role == worker
- depends_on:
- - pg-primary
- volumes:
- pg-primary-vol:
- pg-replica-vol:
Add Comment
Please, Sign In to add comment