ADR-007 — Separate nginx volume for data directory
Status · Accepted Date · 2026-04-01 TA anchor · §stack Scope note (April 2026) · Applicable only to the self-hosted nginx + Docker Compose deployment path. The GitHub Pages preview environment (ADR-014) does not use this mechanism — it deploys a single static build artifact. Production hosting is TBD per ADR-014; this ADR remains valid for any self-hosted nginx deployment that wants independent data release cycles.
Context
Mission data in data/ changes independently from the application bundle in dist/. Updating a mission date or adding a new mission should not require rebuilding and redeploying the JavaScript bundle.
Decision
Mount data/ as a separate Docker volume from dist/. The docker-compose.yml has two volume mounts: ./dist:/usr/share/nginx/html:ro and ./data:/usr/share/nginx/html/data:ro. Updating data/ and running docker compose restart takes effect immediately without a build step.
Rationale
Follows directly from ADR-006. If data is in JSON files, the deployment should make data updates cheap. A contributor who edits a JSON file should not need to run the build pipeline to deploy their change.
Alternatives considered
- Single volume for both dist and data — simpler compose file; couples data update cost to build cost.
- Serve data from a separate port/service — adds operational complexity for no benefit.
Consequences
Positive: data contributors never need to run the build; data and code have independent release cycles. Negative: slightly more complex docker-compose.yml; data/ paths must be consistent between local dev (/data/) and production.