Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time delay vs wait-for-it for startup order #101

Open
MrWinstead opened this issue Apr 19, 2018 · 2 comments
Open

Time delay vs wait-for-it for startup order #101

MrWinstead opened this issue Apr 19, 2018 · 2 comments

Comments

@MrWinstead
Copy link

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

@jshimko
Copy link
Owner

jshimko commented Apr 20, 2018

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!

@MrWinstead
Copy link
Author

Sounds good. I'm closing in on completing this myself. I'll submit a PR soonest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants