What is the best way to deploy python Flask web application in a web server under ubuntu and what web server do you recommend?
-
I usually deploy my python app in GAE but a client wishes to deploy on their ubuntu server. Any good tutorials on deploying? Thank you in advanced
-
Answer:
The Flask documentation has some great information on how to deploy using Fabric. I started with its suggestions and deployment has been a breeze. I've been running on apache but mostly because I have experience with it--I don't know the pros and cons of it vs nginx and others. http://flask.pocoo.org/docs/deploying/#deployment http://flask.pocoo.org/docs/patterns/fabric/
Paul Hemberger at Quora Visit the source
Other answers
http://docs.fabfile.org/ is your friend. If you're used to GAE's push-button-deployment process, you can achieve the same using Flask. Fabric is essentially an alternative to writing shell scripts so you would write a deployment script that would, for example: 1. run tests on your local machine 2. ssh to remote server 3. backup current version of app 4. pull from git 5. pip install requirements 6. restart your wsgi server (apache, gunicorn etc) 7. restart your static files server (nginx) You can stick this in a single Fabric action and deploy like this: # fab deploy_dev
Giv Parvaneh
Related Q & A:
- What is the best way to distribute an audio/video feed from a computer to TVs over existing indoor coax cable?Best solution by Audio-Video Production
- What's the best way to hook up an overhead projector to a laptop?Best solution by Yahoo! Answers
- What's the best way to get a job in a restaurant?Best solution by Yahoo! Answers
- What is the best way to learn how to build websites and web applications with Python?Best solution by Quora
- What's the best way to make a good impression at a job interview?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.