Skip to content

Instantly share code, notes, and snippets.

@SuoXC
Created November 20, 2016 16:24
Show Gist options
  • Save SuoXC/9b2522c142a0ed97a49d5c85c60ef729 to your computer and use it in GitHub Desktop.
Save SuoXC/9b2522c142a0ed97a49d5c85c60ef729 to your computer and use it in GitHub Desktop.
docker compose file to build a redis cluster ?
version: '2'
services:
db:
image: mysql
ports:
- "3306:3306"
volumes:
- ./mysql:/var/lib/mysql
environment: # ???
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_DATABASE: ""
MYSQL_USER: root
MYSQL_PASSWORD: root
redis_master:
image: redis:3.2-alpine
volumes:
- ./redis_data:/data
redis_slave:
image: redis:3.2-alpine
links:
- "redis_master:master"
command: redis-server --slaveof master 6379
php:
image: php
volumes:
- ./src:/var/www/html
links:
- redis_master
- db
ports:
- "8080:80"
command: php -S 0.0.0.0:80 -t /var/www/html/
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment