To enable easy Django deployement I would to the following:
Fisrt-time server configuration
- Install mod_wsgi which allow you to run in embedded mode OR in daemon mode.
- Install python and virtualenv
In your development environment
- Use virtualenv. Take a look at mod_wsgi and virtualenv configuration
- Install Django your django version (using python setup.py install)
- Install your python libs
- Develop your project
Every time you want to deploy
- Copy your virtual environment to the production server
- Just add an Include directive in your httpd.conf file (or use .htaccess) to your project's apache configuration. As stated in mod_wsgi integration with django documentation, one example of how Apache included file could be configured would be:
Alias /media/ /usr/local/django/mysite/media/
Order deny,allow
Allow from all
WSGIScriptAlias / /usr/local/django/mysite/apache/django.wsgi
Order deny,allow
Allow from all
Automating deployement
- I would consider using Fabric to automate deployement