config files for server tools and services to run Python web apps
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
god
gunicorn
nginx
rsyslog.d
sv
README.md

README.md

python-webapp-etc -- config files for tools to deploy Python webapps

Description

This repository is a collection of configuration files for a common Python webapp deployment. This collection of tools is currently used in production at Bueda.

Related Projects

django-boilerplate tornado-boilerplate buedafab comrade

Tools & Services

gunicorn

Gunicorn is "a Python WSGI HTTP Server for UNIX." It's fast, easier to use than Apache's mod_wsgi, and has first-class support for frameworks like Django and Paster.

nginx

Gunicorn doesn't handle slow clients, so the makers "strongly advise that you use Nginx" to proxy incoming requests. We also use the nginx proxy to serve static files.

runit

We use runit (that's "run-it", not "r-unit" as I thought for many months...) to create init-style scripts for each application's gunicorn process.

god

We use god to keep our nginx, gunicorn and celeryd processes running.

This also offers a workaround for a memory leak in celeryd when it runs in DEBUG mode. If the celeryd process consumers over some set amount of memory (e.g. 300MB), god can bounce it for you automatically.

rsyslog

We direct Python's logging module to the syslog, and use rsyslog to split out each application's logs into individual files. Rsyslog can also send these logs to a central server, split by date, etc.

Contributing

If you have improvements to this configuration:

  • Fork the repository on GitHub
  • File an issue for the bug fix/feature request in GitHub
  • Create a topic branch
  • Push your modifications to that branch
  • Send a pull request

Authors