I need help deploying Sanic application to Ubuntu server.
This is not exactly Sanic specific question, but this information could be useful for all Sanic users.
I successfully packed and published my application to PyPi repository.
Pip installation on Ubuntu server went smoothly and my application works.
I specifically want to use the builtin Sanic server.
Currently i run application like so -
sudo python3 main.py --host=10.128.0.34 --port=8080
Now I need to make sure, that Sanic server runs always -
- If VM is restarted - the Sanic must start aswell
- If Sanic crushes - it must be restarted
- If Sanic hangs - it must be restarted
Unfortunately, I little experience with Linux systems and definitely could use some help.
How should I configure Ubuntu server in production to guaranty that my Sanic application always running?