Administration interface and API for Information Sources.
Python dependencies are managed with uv in src/pyproject.toml + src/uv.lock.
Every command runs through uv run (e.g. uv run python manage.py check).
- Add or change a dependency: edit
src/pyproject.toml, then runmake dev_lockto regeneratesrc/uv.lock - Upgrade to the newest allowed patch releases:
make dev_lock_upgrade(ormake dev_lock_upgrade package=django), then runmake dev_test - Sync the dev venv with the lock:
make dev_sync(uv runin the dev container also syncs before running) - The dev venv is
src/.venv. It is created only inside the dev container (Alpine/musl): never runuv syncon the host, since a host venv won't work in the container src/.venvis owned by root (the dev container runs as root). Remove it withmake dev_exec cmd="rm -rf .venv"orsudo- Inside Dropbox, keep it out of sync with
attr -s com.dropbox.ignored -V 1 src/.venv
The www-static nginx (docker-compose.yml) can require HTTP basic auth on the Django app (location /),
to keep a staging/test environment private. /static/ and the /api/ redirect stay public.
- Enable it with
USE_AUTHENTICATION=truein the root.env. Any other value (unset, empty,false) keeps it off, so production needs no change - Create or update a user with
make htpasswd user=<name>(prompts for the password; bcrypt entry saved in the gitignoredconf/nginx/.htpasswd), thenmake prod_up - On hosts without auth,
touch conf/nginx/.htpasswdbefore the firstmake prod_up; otherwise docker creates an empty directory at that path (harmless while auth is off, butmake htpasswdwill ask you to remove it) - How it works:
conf/nginx/templates/variables.conf.templatemapsUSE_AUTHENTICATIONto$auth_enable; the nginx image renders it to/etc/nginx/variables.confat startup (NGINX_ENVSUBST_OUTPUT_DIR), included byconf/nginx/app/app.conf
With BLOCK_ROBOTS=true in the root .env, both www-static (app) and www-docs (uploaded files) send
X-Robots-Tag: noindex, nofollow on every response, so search engines don't index a staging environment.
Any other value (unset, empty, false) sends no header; it is independent of USE_AUTHENTICATION.
- How it works:
conf/nginx/templates/robots.conf.templatemapsBLOCK_ROBOTSto$robots_tag(empty when off, and nginx omits headers with an empty value), rendered to/etc/nginx/robots.confand used by a server-leveladd_header X-Robots-Tag $robots_tag always;inapp.confanddocs.conf - Server-level
add_headeris only inherited by locations without their ownadd_header: if you add one to a location, repeat theX-Robots-Tagline there - There is intentionally no
robots.txtDisallow: /: blocking crawling would keep bots from seeing thenoindex, so already-known URLs could stay indexed