wsgi app #20

  • By nottrobin
  • Latest version (#20)
  • xenial
  • Stable

Description

A charm for hosting the webteam's Python projects


The Webteam WSGI charm

This is the Juju charm for serving the Canonical Webteam's Python WSGI applications.

Basic usage

After being deployed with Juju, the charm needs to be configured with the location of your WSGI module, and then provided with a .tar.gz file containing your application code:

juju deploy cs:~cwebteam/wsgi-app
juju config wsgi-app wsgi=myapplication.wsgi
juju attach wsgi-app build=./myapplication.tar.gz

Development

This charm is built from two charm layers:

To build the charm locally, follow the documentation.

Configuration

provision_command
(string) A command to run in the application directory before running the WSGI application - e.g. for provisioning the database
python3 manage.py migrate
verify_path
(string) The URL path to check to verify the webservice
/
wsgi_module
(string) The python path to the WSGI module and application
webapp.wsgi:application
pip_cache_dir
(string) The name of a folder within the application from which to install pip dependencies
verify_content
(string) Content to check for in the webservice response
verify_status
(string) The HTTP status to expect when checking the webservice
200 OK
apt_dependencies
(string) A space-separated list of apt dependencies for the WSGI application
environment_variables
(string) A space-separated list of environment variables. E.g.: 'VAR1=val1 VAR2=val2'
wsgi_logfile_path
(string) Where to store logs for the WSGI service
/var/log/wsgi.service.log
port
(int) The port where the WSGI service should listen
80
verify_hostname
(string) The hostname to use when checking the webservice
localhost