Flask + Nginx + Gunicorn(on a Vagrant box)
samrat.github.com
samrat.github.com
Check your Vagrantfile and associated recipes into git. Then it's just "git clone; vagrant up"
The benefit of this is that you can share your stack by having someone else just git clone your stack. Rather than a blog post, we'd be looking at your chef recipe. I'd much prefer that.
I've known about Puppet for a while (Chef is new to me) and I've yet to see a tutorial here on HN on how to get up and running with either.
- If you're using bash to install dependencies, it might make sense to stick it in a shell file and run as a provisioner on `vagrant up` [1]
- You can set the NFS shared folder for your working directory to be anything you want in your Vagrantfile, eliminating cp'ing files. [2]
- `pip freeze` catches everything pip has installed, while you really only need Flask, virtualenv and gunicorn in your requirements. [3]
As people have said, Chef and Puppet will help with all of the above and the configuration of nginx, which is awesome. If you use a provisioner, when it comes time to deploy to an actual server, you'll have less manual work to do.
It also has the added benefit of heading towards dev-prod parity, something Vagrant can help with a lot.
[1] http://vagrantup.com/v1/docs/provisioners/shell.html
[2] http://vagrantup.com/v1/docs/nfs.html
[3] http://www.pip-installer.org/en/latest/requirements.html#fre...
edit Found this to help answer my own question:
EDIT: Using pip can simply solve py3 and py2 specific features.
This is one area where python lacks, and that you need