You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.2 KiB
1.2 KiB
Using docker-compose to config startup environment
before we use docker compose, please install docker and docker-compose first : https://docs.docker.com/compose/install/
ShardingSphere-JDBC
- access the docker folder (cd docker/shardingsphere-jdbc/sharding)
- launch the environment by docker compose (docker-compose up -d)
- access mysql / etcd / zookeeper as you want
- if there is conflict on port, just modify the corresponding port defined in docker-compose.yml and then launch docker compose again(docker-compose up -d)
- if you want to stop the environment, use command docker-compose down
ShardingSphere-Proxy
- access the docker folder (cd docker/shardingsphere-proxy/sharding)
- launch the environment by docker compose (docker-compose up -d)
- access proxy by
psql -d sharding_db -h 127.0.0.1 -U root -p 3308 -W
, default password for example: root - if there is conflict on port, just modify the corresponding port defined in docker-compose.yml and then launch docker compose again(docker-compose up -d)
- if you want to stop the environment, use command docker-compose down
to clean the docker container , you could use docker rm docker ps -a -q
(be careful)