feat: add analysis pages and raster risk map
Ship a new app version with broader analytics, restructured dashboards, and a server-rendered risk map. Frontend: - Add Overview, Demographic, Disease, and Environmental Health analysis pages - Add AnomalyMarkers, CalendarHeatmap, and MetricHeatmapTable components - Rebuild Alerts map onto server-rendered raster risk tiles; expand Monitoring, Trend, and District Comparison views - Extend API client, stores, and TypeScript types Backend: - Add environment router (pollutants, lag correlations) - Add risk_raster util serving XYZ 100m risk tiles - Expand cases endpoints (demographics, seasonality, diagnoses) and insights; harden auth and file-based loaders Data & tooling: - Add processed outpatient/inpatient/combined case parquet (LFS) - Add nested CLAUDE.md guides, pyrightconfig, and test updates
This commit is contained in:
44
deploy/CLAUDE.md
Normal file
44
deploy/CLAUDE.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Deploy — Docker Compose
|
||||
|
||||
## Stack
|
||||
|
||||
- Docker Compose with 3 services: `api` (FastAPI), `frontend` (nginx/React), `mlflow`
|
||||
- Multi-stage Dockerfiles: build stage → production stage
|
||||
- Env vars via `.env` file (see `.env.example` for template)
|
||||
|
||||
## Files
|
||||
|
||||
```
|
||||
deploy/
|
||||
docker-compose.yml # Main: api + frontend + PostgreSQL/PostGIS
|
||||
docker-compose.mlflow.yml # MLflow tracking server
|
||||
.env.example # Required env vars template
|
||||
backend/Dockerfile # FastAPI app image
|
||||
backend/.dockerignore
|
||||
frontend/Dockerfile # nginx serving built React app
|
||||
frontend/.dockerignore
|
||||
```
|
||||
|
||||
## Running
|
||||
|
||||
```bash
|
||||
# Full stack
|
||||
docker compose -f deploy/docker-compose.yml up -d
|
||||
|
||||
# With MLflow
|
||||
docker compose -f deploy/docker-compose.yml -f deploy/docker-compose.mlflow.yml up -d
|
||||
```
|
||||
|
||||
## Conventions
|
||||
|
||||
- Never commit `.env` — use `.env.example` as template
|
||||
- Dockerfiles use multi-stage builds to minimize image size
|
||||
- Frontend is built during Docker build, served by nginx
|
||||
- Backend runs uvicorn with `--host 0.0.0.0` inside container
|
||||
|
||||
## Anti-Patterns
|
||||
|
||||
- Don't hardcode ports in docker-compose — use env vars
|
||||
- Don't commit secrets to `.env.example` — placeholder values only
|
||||
- Don't run as root in Dockerfiles — create non-root user
|
||||
- Don't skip `.dockerignore` — keeps build context small
|
||||
Reference in New Issue
Block a user