Ferraganchos & Pinchos

Or how to rip all this stuff out of my head…

Pinax deployment with gunicorn and supervisor

Here is my recipe for Pinax deployment using Python tools as much as possible.

Create virtualmenv and activate it.

virtualenv –no-site-packages myenv
cd myenv/
source bin/activate

Install Pinax from GitHub.

pip install git+git://github.com/pinax/pinax.git

Setup basic pinax project.

pinax-admin setup_project -b basic mypinax

Test the project.

cd mypinax/
python manage.py syncdb
python manage.py runserver

Install gunicorn and test the installation

pip install gunicorn
gunicorn wsgi:application

Setup supervisor.

sudo apt-get install supervisor

Configure mypinax app in /etc/supervisor/conf.d/mypinax.conf

command=/home/xulioc/virtualenv/myenv/bin/gunicorn wsgi:application

Restart supervisor.

sudo /etc/init.d/supervisor/stop
sudo /etc/init.d/supervisor/start



Single Post Navigation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: