im aware of flask deployment options, but all those options seems overkill to me for such a simple flask app that i wrote. it works just fine with flask's own builtin server.
workon kittapp
python run.py // runs the webserver at configured port, everything's fine
heres my run.py file
from kittapp import app
if __name__ == '__main__':
app.run(host=app.config['HOST'], port=app.config['PORT'], debug=app.config['DEBUG'])
first problem is, the server stops as soon as i exit my ssh session, so i tried to push the task to background using one-time cron
jobs, at now
or nohup
commands. it works fine but the second problem is that after a few hours the python process (which was pushed to bg) is not running anymore and the webapp is down.
i know that i need to write a daemon-like startup script for this eventually. just wanted to see if there's any other simple yet reliable solution to deploy a flask app on a ubuntu machine?