Prerequisites
Before starting, copy the sample environment file to the project root:.env with your settings. The most important variables are covered in the configuration reference below.
- Docker (recommended)
- Local install
Docker Compose handles every service — PostgreSQL, RabbitMQ, Memcached, Celery workers, and the Elm frontend build — with a single command.Requirements: Docker and Docker Compose.This starts the following containers:
Verify the setup:
Build and start all services
django, elm, queue (RabbitMQ), tasks (Celery worker), beat (Celery beat scheduler), and cache (Memcached).Seed with sample data
Load the sample datasets bundled in For a full dataset, run Rosie first, then copy the output files to
contrib/data/:contrib/data/ and reference them from /mnt/data/ inside the container.Open the dashboard
| Mode | URL |
|---|---|
| Development | localhost:8000 |
| Production | localhost |
Environment variables
The.env file controls all runtime configuration. Key variables:
Django settings
Django settings
| Variable | Type | Description |
|---|---|---|
SECRET_KEY | string | Django secret key. Required. |
ENVIRONMENT | string | development or production. Controls DEBUG mode. |
LOG_LEVEL | string | Gunicorn log level (e.g. debug, info). Setting debug enables the Django Debug Toolbar. |
ALLOWED_HOSTS | string | Comma-separated list of allowed hostnames. Defaults to *. |
WEB_WORKERS | int | Number of Gunicorn worker processes. |
WEB_TIMEOUT | int | Gunicorn worker timeout in seconds. |
CACHE_BACKEND | string | Django cache backend class (e.g. django.core.cache.backends.memcached.MemcachedCache). |
CACHE_LOCATION | string | Cache server address (e.g. localhost:11211). |
Database and message broker
Database and message broker
| Variable | Type | Description |
|---|---|---|
DATABASE_URL | string | PostgreSQL connection URL. Must be PostgreSQL — JSONField and SearchVectorField require it. |
CELERY_BROKER_URL | string | RabbitMQ or other Celery-compatible broker URL (e.g. amqp://guest:guest@localhost//). |
Google settings
Google settings
| Variable | Type | Description |
|---|---|---|
GOOGLE_ANALYTICS | string | Google Analytics tracking ID (e.g. UA-123456-7). |
GOOGLE_STREET_VIEW_API_KEY | string | Google Street View Image API key for receipt location previews. |
Twitter settings
Twitter settings
| Variable | Type | Description |
|---|---|---|
TWITTER_CONSUMER_KEY | string | Twitter API key. |
TWITTER_CONSUMER_SECRET | string | Twitter API secret. |
TWITTER_ACCESS_TOKEN | string | Twitter access token. |
TWITTER_ACCESS_SECRET | string | Twitter access token secret. |
Production settings
Production settings
| Variable | Type | Description |
|---|---|---|
VIRTUAL_HOST_WEB | string | Hostname for the HTTPS certificate. Add to /etc/hosts when testing locally. |
LETSENCRYPT_EMAIL | string | Email address for the Let’s Encrypt certificate. |
HTTPS_METHOD | string | Set to noredirect to disable HTTP→HTTPS redirect. Default is redirect. |
USE_X_FORWARDED_HOST | bool | Whether to trust the X-Forwarded-Host header. |
SECURE_PROXY_SSL_HEADER | string | Tuple-like value for SECURE_PROXY_SSL_HEADER (e.g. HTTP_X_FORWARDED_PROTO,https). |
