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.
28 lines
690 B
YAML
28 lines
690 B
YAML
# The customer's existing docker-compose — the single source of truth for
|
|
# the app's *base* shape (images, ports, env, volumes). Harmony imports
|
|
# this and derives the k8s deployment; deploy-only knobs (ingress host,
|
|
# storage class, replicas, rolling strategy) live in the deploy crate's
|
|
# Score, never here. See ADR-026.
|
|
name: timesheet
|
|
services:
|
|
backend:
|
|
build: ./backend
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
- DB_PATH=/data/timesheet.db
|
|
volumes:
|
|
- timesheet-data:/data
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
ports:
|
|
- "8081:80"
|
|
environment:
|
|
- BACKEND_URL=http://backend:8080
|
|
depends_on:
|
|
- backend
|
|
|
|
volumes:
|
|
timesheet-data:
|