0

Basically, I follow all of the instructions from here:

deploy Django with nginx + Waitress

All things were going fine, the Django project was successfully deployed.

But the problem that I faced was after I close the cmd of the running script of waitress (runserver.py):

#runserver.py
from waitress import serve

from webproject.wsgi import application
# documentation: https://docs.pylonsproject.org/projects/waitress/en/stable/api.html

if __name__ == '__main__':
    serve(application, host = 'localhost', port='8080')

the website stopped working immediately.

After I run the runserver.py from cmd again, the website was back to work but stopped if I close my cmd again.

The question is how do I keep my website alive without the cmd to running waitress, any help was appreciated.

Ripca
  • 23
  • 4

1 Answers1

0

I found a temporary solution to my problem.

I was using this method to keep my runserver.py on my Window Server background:

How to constantly run Python script in the background on Windows

But I don't think is the best method for deploying Django with Nginx and Waitress.

Ripca
  • 23
  • 4