News for hackers. Stuff that matters.
Re:Flask + Nginx + Gunicorn(on a Vagrant box) by pearkes on Sunday May 27, 2012 @11:06AM (#4030212)
A few things:

- 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...

There are no comments on this comment yet.