I have small app created on python flask and deployed on EC2 aws machine, when I do ssh to ec2 machine and starts flask, it works, but when I terminate the session the flask dies, I can run it using nohup. What is the best way to make it independent of ssh session and run it continuously.
There are several options:
nohup python app.py &
screen
supervisord
(link) on system startup and control all through it (pythonic way :))nohup means: do not terminate this process even when the stty is cut off.
& at the end means: run this command as a background task.