Giter VIP home page Giter VIP logo

Comments (4)

desaintmartin avatar desaintmartin commented on May 22, 2024

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.

from uwsgi-nginx-docker.

ReallyLiri avatar ReallyLiri commented on May 22, 2024

Made the simple required steps to make image crash on app fail:
https://gist.github.com/ReallyLiri/f833510d350b242ff89b9b76fdf21ea5

from uwsgi-nginx-docker.

tiangolo avatar tiangolo commented on May 22, 2024

Thanks for the discussion everyone! And thanks for the example @ReallyLiri.

I implemented it here: #110

The only caveat is that currently, Supervisor terminates "cleanly", with a 0 return code. I imagine it would be ideal for it to terminate with a non-zero return code, but it doesn't seem to be supported by Supervisor. I imagine it could be possible to "hack" around and make something (like the event handler maybe?) exit with some unexpected result, to make Supervisor take it as an error and exit with an error code. But that seems quite hacky, and probably not trivial to implement.

But for this specific issue, I hope that PR and the latest version of the image would handle it.

from uwsgi-nginx-docker.

github-actions avatar github-actions commented on May 22, 2024

Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.

from uwsgi-nginx-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.