Created
January 27, 2016 08:01
-
-
Save mavencode01/13789389a45ee9ec9d5e to your computer and use it in GitHub Desktop.
postgres replicated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psql-master: | |
image: 'sameersbn/postgresql:9.4-4' | |
deployment_strategy: emptiest_node | |
environment: | |
- DB_NAME=gitlabhq_production | |
- DB_PASS=password | |
- DB_USER=gitlab | |
- PSQL_MODE=replicator | |
- PSQL_TRUST_LOCALNET=true | |
- REPLICATION_USER=replicator | |
- REPLICATION_PASS=replicatorpass | |
- | |
tags: | |
- production | |
- ops | |
- db | |
volumes: | |
- /opt/postgresql/data:/var/lib/postgresql | |
psql-slave: | |
image: 'sameersbn/postgresql:9.4-4' | |
deployment_strategy: high_availability | |
environment: | |
- DB_NAME=gitlabhq_production | |
- DB_PASS=password | |
- DB_USER=gitlab | |
- PSQL_MODE=slave | |
- PSQL_TRUST_LOCALNET=true | |
- REPLICATION_HOST=psql-master | |
- REPLICATION_USER=replicator | |
- REPLICATION_PASS=replicatorpass | |
- REPLICATION_PORT=5432 | |
links: | |
- psql-master | |
tags: | |
- production | |
- ops | |
- db-slave | |
volumes: | |
- /opt/postgresql/data:/var/lib/postgresql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment