|
|
|
|
|
by xmatos
3897 days ago
|
|
I use git hooks for my Django deployments and it couldn't be simpler. My post-receive hook look like this: #!/bin/sh dest=/var/www/myproj GIT_WORK_TREE=$dest git checkout -f $dest/manage.py collectstatic --noinput $dest/manage.py migrate touch $dest/myproj/wsgi.py Running a git push to the prod server fires this hook and that's all. I could improve it by first checking out to a test environment to run django tests and, if everything passes, do a git checkout to production. Plus, am I the only one using apache? |
|
As a side note: I've run copious tests against Nginx -> uWSGI setups and Gunicorn, etc. setups, and Nginx -> uWSGI is in a whole different league (way faster, way more requests per second, way less memory, and you CAN (despite what I'm reading herein), very EASILY with uWSGI, deploy without losing a single request). However, I still use Gunicorn, because it's quick and easy, it works well, and I don't have to sys admin the thing.