Demonstrates the compose-as-source-of-truth path (ADR-026): import an existing docker-compose.yml into typed Scores, then build/publish/deploy with the fleet pattern (no ApplicationScore, no ArgoCD). - compose.rs: docker-compose-types → typed ComposeApp; loud on bind mounts / unparseable ports, warns on depends_on/command/restart. - chart.rs: per-service Deployment+Service (unique filenames), RWX PVC per mounted named volume, RollingUpdate/Recreate strategy. Deploy-only knobs live here, never in compose or Harmony.toml. - score.rs: ComposeAppScore = helm upgrade --install + public Ingress. - publish.rs: docker build/push each built service + helm package/push. - app/: minimal real Java(SQLite)+React(nginx) compose stack. - 16 unit tests over import + chart generation.
16 lines
676 B
Markdown
16 lines
676 B
Markdown
# Timesheet (demo compose app)
|
|
|
|
Minimal two-tier app used to demo Harmony deploying an existing `docker-compose`
|
|
stack. Add timesheet notes; they persist to SQLite.
|
|
|
|
- **backend** — JDK `HttpServer` (no framework) on `:8080`, SQLite via sqlite-jdbc.
|
|
REST: `GET /api/health`, `GET /api/entries`, `POST /api/entries`.
|
|
- **frontend** — React (Vite) served by nginx on `:80`; nginx proxies `/api/`
|
|
to the backend (`BACKEND_URL`), so the bundle stays env-agnostic.
|
|
- **volume** `timesheet-data` mounts at `/data`; the DB lives at `/data/timesheet.db`.
|
|
|
|
```sh
|
|
docker compose up --build
|
|
# frontend → http://localhost:8081 backend → http://localhost:8080/api/health
|
|
```
|