Open MrWinstead opened 6 years ago
Not a bad idea. I'll take a closer look.
I assume you know this, but in the meantime, you can also use the STARTUP_DELAY
environment variable to set the number of seconds to wait on container startup. Or you can use a Docker Compose file and set the depends_on
key to make sure the app container waits for the database container to start.
Obviously, neither of those options are better than something that checks actual connectivity, so perhaps wait-for-it
would be a nice simple solution to add. I'll check it out.
Contributions are always welcome too!
Sounds good. I'm closing in on completing this myself. I'll submit a PR soonest
Current Behavior
In the docker documentation for controlling startup order, they recommend using (among others) wait-for-it. Currently the only available method for controlling startup order is a time-based timeout
Expected Behavior
Optionally support using network-based startup order control using wait-for-it