Kill container on app start fail #61
Open
Comments
|
If you are using an orchestrator like Kubernetes, you can add some liveness probe that will restart the container if either nginx or uwsgi is not working. In any case, you can override the supervisor configuration file in your image to fit your needs! I've been myself thinking of an even more extreme solution for some time now: have a dedicated nginx container and a dedicated uwsgi container. This way, it is atomic. But I haven't done it because... this image simply works for our use case and is easily debuggable. |
|
Made the simple required steps to make image crash on app fail: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I read this issue: tiangolo/uwsgi-nginx-flask-docker#3
It seems that setting
need-app = trueis not enough to kill the container, as supervisor keeps on restarting the app.Please consider adding
autoresetart=falseinsupervisord.confsection foruwsgi, or to make these easily configurable in other some way.To have supervisor actually kill the container you'd have to set up some more configuration, see:
https://serverfault.com/questions/760726/how-to-exit-all-supervisor-processes-if-one-exited-with-0-result
The text was updated successfully, but these errors were encountered: