Created
May 13, 2019 09:12
-
-
Save Nikkely/ffa66e6a5a6b9019a2318bdf97d66d33 to your computer and use it in GitHub Desktop.
redis replication on docker-compose
This file contains 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
version: '3' | |
services: | |
redis: | |
image: redis:5.0.0 | |
container_name: master | |
ports: | |
- "6379:6379" | |
networks: | |
- redis-replication | |
redis-slave: | |
image: redis:5.0.0 | |
container_name: slave | |
ports: | |
- "6380:6379" | |
command: redis-server --slaveof master 6379 | |
depends_on: | |
- redis | |
networks: | |
- redis-replication | |
networks: | |
redis-replication: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment