Ask HN: Host multiple flask and django apps on single server
What would be the best way to host multiple flask and django apps on a single server? From reading around it seems to better to use nginx and/or gunicorn, but I can't decide between nginx alone OR nginx + gunicorn. Should I consider Tornado? I don't really plan to have real-time stuff in my apps.
I'm using an EC2 micro instance (Ubuntu Precise)
6 comments
[ 4.8 ms ] story [ 18.4 ms ] threadIn addition to what's already been mentioned, you'll definitely want to be using virtualenv for portability. Being able to maintain different libraries for different apps is essential, and virtualenv does a great job of keeping things isolated.
The more you use it, the more you have to use it. I had two projects with different authentication mechanisms that were unfortunately named the same thing. I accidentally deployed one without virtualenv and spent the next whole day figuring out what happened.
Virtualenv is a life-saver, and it's so easy to do that you might as well just always do it everywhere.