Deploy on Docker¶
The repo-root Dockerfile + docker-compose.yml build a non-root image serving the portal via gunicorn on port 8000.
1. Prepare the project directory¶
The container bind-mounts ./project to /app/project, so place your honor.config.json + data/ there:
project/
βββ honor.config.json
βββ data/
βββ <slug>.db # created by lvt-honor import
You can generate these on the host (no Python needed inside the container):
mkdir -p project/data
# ... copy your honor.config.json + the seeded data/<slug>.db into project/ ...
2. Build + run¶
3. Verify¶
Open http://localhost:8000 for the honor roll, /search, and /admin.
Notes¶
- Non-root: the container runs as a
app:appsystem user. - Healthcheck: probes
/health(dependency-free) every 30s. - Single worker:
WEB_CONCURRENCY=1because the default SQLite store isn't multi-process safe. To scale horizontally, move the store to a shared host and bumpWEB_CONCURRENCY. - Editing config: Change
project/honor.config.jsonon the host and rundocker compose restart. No rebuild is needed. - Admin surface: put the container behind a reverse proxy (Nginx / Caddy / Traefik) with TLS + auth before exposing
/adminpublicly.