[Chicago] deploying django apps, first steps for newbie

Cezar Jenkins emperorcezar at gmail.com
Wed Nov 20 18:06:43 CET 2013


On November 20, 2013 at 10:46:50 AM, sheila miguez (shekay at pobox.com) wrote:
Okay, let's say I have a site in production that is somewhat organized according to this excellent blog post, <http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/>.

For every new release, I could write something that fetches a tarball from github for the release, makes a new virtualenv specific to that release, and untars the repo following the convention in that blog post. I would keep some number of old virtualenvs around for a while. That's my newbie idea, and I'd like to know what best practices are for this kind of stuff.
This is starting to be a good practice. It’s more important as your virtualenv grows. Check out the python buildpack from Heroku https://github.com/heroku/heroku-buildpack-python



More newbie questions:

worse practices
* how bad is it that I pip install things that require compiling on my production box (psycopg2 for example)?
Not bad, everyone does it.


* how bad is it to install git on my production box?
Unless you have a large infrastructure, most of the time your deploy script will run on the box and fetch using git.



Eventually I think I'll set up my own pypi. I think I could also try and figure out how to make packages for things like psycopg2 so I don't need to compile them. (assuming there is some reason I wouldn't want to use a distro's package? is there?)
Python Wheel packages can do this, but they are reasonably new and I’ve never used them for anything serious.




--
sheila
_______________________________________________ 
Chicago mailing list 
Chicago at python.org 
https://mail.python.org/mailman/listinfo/chicago 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20131120/4905a6f1/attachment.html>


More information about the Chicago mailing list