Answer the question
In order to leave comments, you need to log in
How to deploy a Flask application to production?
Hello.
The essence of the problem - there is an application written in Flask, acting as a rest api backend for a web application written in JS. SQLite is used as a database.
Tell me the procedure for deploying a backend to production. The application itself is not complex (that's why Flask was chosen), but I would like more uptime. Initially it will be deployed on Raspberry, then, perhaps, somewhere in the cloud hosting..
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
I use nginx + uwsgi + flask.
uwsgi with supervisor as www-data, code in /var/www/_site_name_
.
To avoid unpleasant incidents, I do this using a set of simple Ansible scripts:
I check the code and scripts on a virtual machine with Vagrant.
It sounds scary, but it’s quite convenient and easy to remember after a break.
Surely there are easier ways :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question