This is the U-Report dashboard built on data collected by RapidPro.
Built for UNICEF by Nyaruka - http://nyaruka.com
Install dependencies
% pip install --upgrade pip uv
% uv venv
% uv sync --all-groups
% bun install
Link up a settings file (you'll need to create the postgres db first, username: 'ureport' password: 'nyaruka')
% ln -s ureport/settings.py.postgres ureport/settings.py
Sync the database, add all our models and create our superuser
% python manage.py syncdb
% python manage.py migrate
% python manage createsuper
% python manage collectstatic
At this point everything should be good to go, you can start with:
% python manage.py runserver
Note that the endpoint called for API calls is by default 'localhost:8001', you can uncomment the RAPIDPRO_API line in settings.py.postgres to go against production servers.
The repository ships a Dockerfile that builds a single image serving all the
process types — static assets are collected, content-hashed, offline-compressed and precompressed
(brotli and gzip) into the image and served by the web process itself (whitenoise), responses carry their security,
caching and compression headers from the app so a reverse proxy in front needs to add none, and all deployment configuration comes from environment variables (see
ureport/settings.py.docker). The web process is the default command; workers
run from the same image with the beat scheduler embedded (-B - RedBeat's redis lock
keeps exactly one beat active, so it's safe on every worker):
% gunicorn ureport.wsgi:application # default CMD
% celery -A ureport worker -B -Q sync -Ofair # a queue worker (embedded scheduler)
Required environment: DJANGO_SECRET_KEY, DATABASE_URL and VALKEY_HOST (or
VALKEY_URL). See ureport/settings.py.docker for the optional settings
(hostnames, email, object storage, security toggles).
For a local containerized stack:
% docker compose up --build
% docker compose exec web python manage.py migrate
% docker compose exec web python manage.py createsuperuser