blob: cf82bda57e5a8fa5b61184ddda5ade0156ae7503 [file] [log] [blame]
version: '3.7'
services:
mysql:
## mysql version, you could get more tags at here : https://hub.docker.com/_/mysql?tab=tags
image: "mysql:5.7"
## default port is 3306, you could change to 33060 or any other port doesn't conflict MySQL on your OS
ports:
- "3309:3306"
container_name: proxy-mysql
## launch mysql without password
## you could access the mysql in container by following command :
## docker exec -it sharding-sphere-mysql mysql -uroot
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
## if you insist to use password in mysql, remove MYSQL_ALLOW_EMPTY_PASSWORD=yes and uncomment following args
# - MYSQL_ROOT_PASSWORD=root
ulimits:
nofile:
soft: "65536"
hard: "65536"
volumes:
- ../../../src/resources/manual_schema.sql:/docker-entrypoint-initdb.d/manual_schema.sql
- ./mysql-conf/my.cnf:/etc/mysql/my.cnf
zookeeper:
## get more versions of zookeeper here : https://hub.docker.com/_/zookeeper?tab=tags
image: "zookeeper:3.4"
ports:
- "2185:2181"
container_name: sharding-proxy-zookeeper-mysql
proxy-sharding:
image: "sharding-proxy:release"
build:
## dockerfile path
context: ../..
## dockerfile file name
dockerfile: Dockerfile
## prots map
ports:
- "3308:3307"
## constainer name
container_name: sharding-proxy-mysql
depends_on:
- mysql
entrypoint: ./usr/local/bin/docker-entrypoint.sh
volumes:
- ./conf-sharding:/sharding-proxy/conf
proxy-orchestration:
image: "sharding-proxy:release"
build:
## dockerfile path
context: ../..
## dockerfile file name
dockerfile: Dockerfile
## prots map
ports:
- "3307:3307"
## constainer name
container_name: orchestration-proxy-mysql
depends_on:
- mysql
entrypoint: ./usr/local/bin/docker-entrypoint.sh
volumes:
- ./conf-orchestration:/sharding-proxy/conf