Welcome to Salty WSGI’s documentation!

Salty WSGI is a set of Saltstack configuration states for easy deployment of Python WSGI apps (Django, Flask, etc) with Supervisord, Nginx, Virtualenv.

It is oriented towards making a continuous deployment of Django/WSGI apps as simple as possible.

Initial deployment:

  • Place the list of your dependencies into requirements.txt.

  • Create Procfile with services that needs to be running (Gunicorn, Celery, etc.)

  • Copy salt/roots/pillar/data.sls.example -> salt/roots/pillar/data.sls, salt/roots/pillar/top.sls.example -> salt/roots/pillar/top.sls. And fill in your values in data.sls. Read more in Pillar configuration.

  • Provision your virtual machine with Saltstack and a set of Salty WSGI configs

  • Add your deployment repo to git remotes

    $ git remote add deploy {user}@{server}:.repos/{project_name}.git
    
  • Push your code to the server

    $ git push deploy master
    
  • Run syncdb or similar command for creating your database

  • Your website should be up and running.

Updating your website:

  • Just push your code to the server

    $ git push deploy
    

Read more about how to start with Salty WSGI:

Indices and tables