ryscheng / sql-proxy-rs

Programmable MariaDB/Postgres Proxy for Rust
Apache License 2.0
17 stars 10 forks source link

Add docker-compose #13

Closed nhynes closed 4 years ago

nhynes commented 4 years ago

This PR attempts to consolidate the docker scripts into a single docker-compose setup. AFAIK, the mariadb-proxy container runs mariadb-proxy-rs which sends commands to mariadb-server and tendermint. I'm not totally clear on how TM makes its way in there; perhaps someone could clarify based on the links sections in the docker-compose.yml.

Omitted from docker-compose is the mysql client container since it requires sleeping for 30s before mariadb comes online, and then immediately exits as the terminal is non-interactive. I could use some help understanding where exactly the mysql client is used (if not exclusively from mariadb-proxy-rs). Is it for verifying that data has been committed? In that case, one can always docker exec mariadb-server mysql --user=root --host=localhost --port=3306 --password=devpassword and feed it commands.

Otherwise, to run,

docker-compose up

and, to enter the rust container, make shell.

Currently, the tendermint container exits with a permission denied error, but that seems to be due to this issue. If I had an example of how the integration tests use the proxy and TM, I'd be better able to get this part running.

ryscheng commented 4 years ago

https://www.docker.com/blog/maintainable-integration-tests-with-docker/