We have 5 docker containers in our docker-compose.yml, and some dependencies between them. Right now, we don't really enforce those dependencies well. Eg: balrogadmin simply sleeps before starting up (to wait for the database), and balrogagent just spews errors until balrogadmin is started. As of Docker 1.12.0, there's a new "healthcheck" feature that can be used to delay a container startup until the healthcheck command is successful. http://stackoverflow.com/questions/31746182/docker-compose-wait-for-container-x-before-starting-y/41854997#41854997 has a very relevant example. For our purposes, we'll want: * balrogadmin to wait until mysql is up (we can probably use nc to check port 3306 of the balrogdb container for this) * balrogpub to wait until mysql is up * balrogagent to wait until balrogadmin is up (we can probably use a similar curl command as the stackoverflow link for this) * balrogui to wait until balrogadmin is up
Commit pushed to master at https://github.com/mozilla/balrog https://github.com/mozilla/balrog/commit/b74d1fba10a43d0bea91fd1ea70218ac9bbead6d Bug 1344716: Add health checks to Docker-compose file (#297). r=bhearsum
This is a great improvement to the developer experience, thank you Durodola!
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.