Deploy Django App in 5 Easy Steps

So you just bought a new VPS, have installed Ubuntu and want to deploy
your django app, GREAT!! We shall get your app, up and running in 5 easy steps, using best(arguably) of tools available. The post is targeted to audience who are new to deployment arena, but assumes you are comfortable with developing basic django apps. We shall be using gunicorn as our server and nginx nginx as our reverse proxy and static hanlder. Here we go:

create mysql db:

create a database with the name matching your settings.py

Start nginx:

sudo service nginx restart

Start server:

go to scripts directory:
chmod +x start.sh(only for the first time)
bash start.sh

The above post was a general introduction of how you can begin using lightweight yet scalable tools, in the next post we shall be talking about tools as fabric, supervisor and Monit, which makes things far easier and more secure. Experienced admins can point out flaws in the approach and suggest improvements.

Thank you for reading the Agiliq blog. This article was written by saket on Feb 22, 2012 in
vps
.