S
S
SrJ2015-12-10 18:28:06
Flask
SrJ, 2015-12-10 18:28:06

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

2 answer(s)
M
m12sl, 2015-12-10
@m12sl

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 :)

S
sim3x, 2015-12-10
@sim3x

How to properly install Flask in production?
flask.pocoo.org/docs/0.10/deploying

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question