Last active
March 2, 2016 08:16
-
-
Save junxy/5af479ff047f3a964ef3 to your computer and use it in GitHub Desktop.
redis replication docker-compose.yml https://github.com/bitnami/bitnami-docker-redis#step-2-create-the-replication-slave
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
| RedisMaster: | |
| image: bitnami/redis:latest | |
| ports: | |
| - "6380:6379" | |
| environment: | |
| - REDIS_PASSWORD=password | |
| - REDIS_REPLICATION_MODE=master | |
| restart: always | |
| RedisSlave: | |
| image: bitnami/redis:latest | |
| ports: | |
| - "6379" | |
| environment: | |
| - REDIS_PASSWORD=password | |
| - REDIS_MASTER_HOST=master | |
| - REDIS_MASTER_PORT=6379 | |
| - REDIS_MASTER_PASSWORD=password | |
| - REDIS_REPLICATION_MODE=slave | |
| links: | |
| - RedisMaster:master |
Author
Author
docker-compose scale RedisMaster=1 RedisSlave=3
docker exec -it redis2_RedisMaster_1 redis-cli -a password INFO Replication
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://docs.docker.com/compose/compose-file/