4
This is a [Juju](https://juju.ubuntu.com/) [charm](https://juju.ubuntu.com/charms/) for setting up an [Apache](http://httpd.apache.org/) [mod_wsgi](http://modwsgi.readthedocs.org/en/latest/) server for a basic [Python](https://www.python.org/) [WSGI](http://wsgi.readthedocs.org/en/latest/) app.
9
Hopefully, this charm will eventually be included in the [Juju charm repository](https://jujucharms.com/), so you can use it with simply `juju deploy apache-wsgi`, but for now you'll need to clone it to use it:
13
Clone the charm into your `trusty` folder within your charms directory, with the name `django-legal`, e.g.:
16
mkdir -p ~/charms/trusty && cd charms
17
git clone git@github.com:nottrobin/apache-wsgi-charm.git trusty/apache-wsgi
22
You'll need a link to a zipped tarball of your project, and then to include that in a charm config file along with the other options:
29
app_tgz_url: "https://github.com/username/repo/archive/master.tar.gz"
30
wsgi_file_path: "django-app/wsgi.py"
31
download_dependencies: False
34
Then deploy this charm with the config file:
37
juju deploy --config=config.yaml local:trusty/apache-wsgi
42
If your app wants to make use of a [MongoDB](http://www.mongodb.org/) server, you can do that by adding a relation:
46
juju add-relation apache-wsgi mongodb
49
Now the MongoDB URI for your application to use will be available in the environment variable `MONGODB_URI`.
53
For a full list of config options, see the default config options in [`config.yaml`](config.yaml).