Commit 94277cc7 authored by Chris Lamb's avatar Chris Lamb
Browse files

Document the top-level directories. (Closes: #21)

parent 924bb5cf
## Directory tree layout
* `freenodejobs/`
This directory contians the [Django]( project for this. It makes use of nested [applications]( to organise the code.
* `freenodejobs/settings/`
This directory contains the distributable [Django settings]( for the project. The majority of the settings are stored in `defaults/*.py` and then "roles" are applied on top of this to override them when running outside of production and/or in tests controlled by the `` file that is overridden by the deployment. For local settings to your personal environment. you can add them to the `freenodejobs/settings/` file.
* `media/`
This directory contains assets that will are served publically via Nginx. They are managed by the [Django staticfiles mechanism]( with the addition of the [`django-staticfiles-dotd`]( third-party application to automatically concatenate `foo.ext.d` directories (into a `foo.ext` file) and to render `.scss` ([Sass]( files via the `STATICFILES_DOTD_RENDER_PIPELINE` setting.
* `templates/`
Contains regular [Django templates]( organised by application.
* `data/`
This directory contains files that should be available to the Django project but not available via the web server (c.f. `static/`).
* `config/`
Contains [Ansible]( roles, etc. for deploying the site. Called via `.travis.yml`, the main script is at `deploy/entry` which expects a `ANSIBLE_VAULT_PASSWORD` variable to be exported to the environment (set in the private [Travis CI]( settings, but also available in [Lastpass]( in order to decrypt private data such as SSH keys, AWS keys, Django's [`SECRET_KEY`](, etc.
* `debian/`
As part of the deployment pipeline, a Debian `.deb` package is built using [dh-virtualenv]( to ensure a tidy installation on the target server. The [Gunicorn]( WSGI server is started via the [systemd]( `debian/freenodejobs.freenodejobs-gunicorn.service` file.
## Local database setup
1. Create PostgreSQL user with an id matching your UNIX username:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment