How do I terminate a flask app that's running as a service?

后端 未结 3 1908
無奈伤痛
無奈伤痛 2020-12-19 16:51

I was able to get my flask app running as a service thanks to Is it possible to run a Python script as a service in Windows? If possible, how?, but when it comes to stopping

3条回答
  •  有刺的猬
    2020-12-19 17:29

    I recommend you use http://supervisord.org/. Actually not work in Windows, but with Cygwin you can run supervisor as in Linux, including run as service.

    For install Supervisord: https://stackoverflow.com/a/18032347/3380763

    After install you must configure the app, here an example: http://flaviusim.com/blog/Deploying-Flask-with-nginx-uWSGI-and-Supervisor/ (Is not necessary that you use Nginx with the Supervisor's configuration is enough)

提交回复
热议问题