docker-mysql-master-slave
docker-mysql-master-slave copied to clipboard
FIX: #6 Add logs folder mount
Migrated log_bin
and replay-log
from /var/log/mysql
to /var/lib/mysql
as mysql:5.7
doesn't contain the /var/log/mysql
folder.
reference: https://stackoverflow.com/questions/26648821/how-can-i-enable-mysql-binary-logging-using-the-official-docker-image
@vbabak @renanbenedicto please help verify the changes and approve the PR.
Reverted back to original config for logs in the /var/log/mysql
folder by adding volume mount as suggested in #6 by @matdurand.
also made some other changes like:
- Added healthcheck for master and updated client depends on master to be healthy.
- Updated .gitignore with logs folder
@vbabak @renanbenedicto please help review
@sarbesh I think you should add the 2 empty "logs" folder, with a .gitkeep
file inside to make sure they exists when we checkout and start the docker-compose setup.
@vbabak @matdurand the logs folder is auto created when running the build.sh
. should we still create logs
folder with .gitkeep
.
@sarbesh I don't see anything that creates the log folder in the build.sh file. If they are created when we start docker compose, then it's too late to map them is it not?
@matdurand yes I believe the folders are getting created when docker compose is ran, We can still add the logs
folder with .gitkeep
to be on safe side.
@sarbesh I would add "logs" folder similar to "data", including ".gitkeep". Could you also update build.sh
and add logs cleanup?
@vbabak apologies for the delay. Made the changes as requested above. Please review.