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

docker-compose up fails because elasticsearch does not spin up in time #11

Closed
brightredchilli opened this issue Nov 30, 2017 · 2 comments

Comments

@brightredchilli
Copy link

The issue, as far as I can see it, is that on my machine, the es instance does not spin up in 15s(3 retries x 5s from the web service). This causes the web box to exit prematurely. I worked around this by using the wait-for-it script and modifying docker-compose to match. The workarond, in summary:

  1. Download wait-for-it.sh file into the flask-app directory
  2. Replace command: python app.py with command: ["./wait-for-it.sh", "es:9200", "--", "python", "app.py"]
  3. Run docker build -t <username>/foodtrucks . to update the image
  4. Re-run docker-compose up

This is probably not the best way to do it but I thought I'd record it here in case anyone else has the same issues.

Another obvious solution is simply to increase the timeout. Happy to make a pull request for either.

@prakhar1989
Copy link
Owner

I've updated the compose script with some changes, and hopefully it should be working fine now. Feel free to reopen the issue if it still persists.

@MattConrad
Copy link

I had (what apparently was) the same issue and brightredchilli's workaround worked for me. Just an FYI.

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

3 participants