I'm following a Docker getting-started workshop and ran into a startup race while using Docker Compose. The application container starts before MySQL has finished initializing, so it repeatedly waits for mysql:3306 and eventually fails with an ECONNREFUSED error. If I run docker compose down and then bring everything back up, it works because the database has already been initialized. Is this expected, and what is the recommended way to ensure the application only starts connecting after MySQL is ready?
0 Answers
There is no answer to this question yet. If you know the answer or can offer some help, please use the form below.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures