Mon 12 August 2013 In Sys. tags: djangogit

Deploying stuff in one command is becoming the Holy Grail of development, with currently ten times more blog articles than Medieval crusades :)

I could not miss the opportunity to write mine !

Disclaimer: In order to keep this article as clear (and short) as possible, the first step setup on a blank server does not use any provisionning system (another religious matter).

Prerequesites : easy dependencies Having a simple Makefile for your application is highly recommended, it will gather all repetitive commands for setting up dependencies. Here is a minimalist (working) example, with a project called revolution install: bin/python bin/python: virtualenv . bin/python setup.py develop serve: bin/python bin/python ./manage.py runserver 8888 deploy: bin/python bin/python ./manage.py collectstatic --clear --noinput touch revolution/wsgi.py # trigger reload clean: rm -rf bin/ lib/ build/ dist/ *.egg-info/ include/ local/ If your project does have any setup.py , just write one or use a requirements.txt file and replace bin/python setup.py develop in Makefile with bin/pip install -r requirements.txt . Now you can then run your deployment commands with make deploy .