wiki:RunPinax

Run Pinax on uWSGI

You have to run at least a 0.9.5 release of the uWSGI server

  • download a release bundle and untar it
  • from the untarred directory run
python scripts/pinax-boot.py <DIR>

where DIR is the path to the python virtualenv you want to create

  • now activate your virtualenv with
source <DIR>/bin/activate
  • then create your first pinax project (we will call it pinaxsite, and we will use the social_project)
pinax-admin clone_project social_project pinaxsite
  • now run syncdb to populate your database
cd pinaxsite
python manage.py syncdb
  • finally run uWSGI (we will use tcp port 3031)
uwsgi --socket :3031 --home <DIR> --wsgi-file <DIR>/pinaxsite/deploy/pinax.wsgi

or

uwsgi -s :3031 -H <DIR> --wsgi-file <DIR>/pinaxsite/deploy/pinax.wsgi

or with the xml file (call it pinax.xml)

<uwsgi>
  <socket>:3031</socket>
  <home>DIR</home>
  <wsgi-file>DIR/pinaxsite/deploy/pinax.wsgi</wsgi-file>
</uwsgi>
uwsgi -x pinax.xml

(remember that <DIR> is the path to your pinax virtualenv)

Your pinax site is now ready. Remember to finetune your uWSGI server !

older uWSGI version

On older uWSGI version you cannot use the .wsgi files, so you have to rename the pinax.wsgi file into pinax.py and call it with the -w flag after setting the --pythonpath directive:

uwsgi -s :3031 -H <DIR> --wsgi-file --pythonpath <DIR>/pinaxsite -w deploy.pinax