Hi there,
when I deploy my django projects I always run several commands after
pulling latest code from repository. I've started using setup.py few
weeks ago which adds manage.py script into $VENV/bin.

Basicaly, I always do:

source $VENV/bin/activate
export DJANGO_SETTINGS_MODULE=...

git pull
python setup.py install
manage.py syncdb --noinput
manage.py migrate
manage.py collectstatic --noinput
manage.py compilemessages


I wrote deployment scripts in fabric, salt, ansible, but now I'm
thinking that all these 'manage.py' actions should be part of setup
script. Anytime when would I run ``python setup.py install``
the setup script would run all defined management commands so my
environment, database and other stuff stays up to date.


I've found that install command can be extended:

http://www.niteoweb.com/blog/setuptools-run-custom-code-during-install

I haven't found any references that anyone have used this method to
deploy django project, so I'm looking for anyone who tried this
approach before.


Thanks in advance

Cheers,
   Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to