~brad-marshall/charms/trusty/apache2-wsgi/fix-haproxy-relations

« back to all changes in this revision

Viewing changes to README.md

  • Committer: Robin Winslow
  • Date: 2014-05-27 14:00:44 UTC
  • Revision ID: robin.winslow@canonical.com-20140527140044-8rpmb3wx4djzwa83
Add all files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Apache WSGI charm
 
2
==
 
3
 
 
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.
 
5
 
 
6
Usage
 
7
---
 
8
 
 
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:
 
10
 
 
11
### Cloning
 
12
 
 
13
Clone the charm into your `trusty` folder within your charms directory, with the name `django-legal`, e.g.:
 
14
 
 
15
``` bash
 
16
mkdir -p ~/charms/trusty && cd charms
 
17
git clone git@github.com:nottrobin/apache-wsgi-charm.git trusty/apache-wsgi
 
18
```
 
19
 
 
20
### Preparing
 
21
 
 
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:
 
23
 
 
24
 
 
25
``` yaml
 
26
# example config.yaml
 
27
 
 
28
apache2-wsgi:
 
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
 
32
```
 
33
 
 
34
Then deploy this charm with the config file:
 
35
 
 
36
``` bash
 
37
juju deploy --config=config.yaml local:trusty/apache-wsgi
 
38
```
 
39
 
 
40
### Mongodb
 
41
 
 
42
If your app wants to make use of a [MongoDB](http://www.mongodb.org/) server, you can do that by adding a relation:
 
43
 
 
44
``` bash
 
45
juju deploy mongodb
 
46
juju add-relation apache-wsgi mongodb
 
47
``` 
 
48
 
 
49
Now the MongoDB URI for your application to use will be available in the environment variable `MONGODB_URI`.
 
50
 
 
51
### Configuring
 
52
 
 
53
For a full list of config options, see the default config options in [`config.yaml`](config.yaml).