prakhar1989/docker-curriculum

Outdated Node, Flask not picking up ES in docker compose

egor83 opened this issue · 1 comments

When building the image including the Node.js, it complains about the outdated version - might be a good idea to update it.

Also, Docker Compose came installed with Docker Engine for me on Linux, and it's "docker compose" rather than "docker-compose" now.

And I had a problem with Flask/ES - when doing "docker compose up", ES took a while to load, and Flask's 3*5 seconds delay was not enough - it failed when it could not discover ES. It started to work after I increased sleep delay to 15 seconds here:
https://github.com/prakhar1989/FoodTrucks/blob/master/flask-app/app.py#L32

That said - thanks a lot for this tutorial, it's great!

I found this too. Seems it takes ElasticSearch a little while to build the index. Upping it to 15 second timeout, it seems it fails the first time but if you also add restart: on-failure to the web container it will restart when it fails the first time. I'm running this on an M1 MacBook Air