M0 · Bootstrap: soluzione, immagine Docker, Gitea Actions #115

Merged
Alby96 merged 1 commits from feat/m0-bootstrap into main 2026-11-11 11:57:27 +01:00
Owner

Prima unità di sviluppo (milestone M0, versione 0.0.1): lo scheletro su cui si costruiscono le milestone successive.

Cosa contiene

  • Soluzione Khaemhat.sln: i 10 progetti di SPEC §3 + 6 progetti di test MSTest; Directory.Build.props/targets (warning come errori, analyzer, documentazione XML, versione da tag git), Central Package Management con l'allowlist, .editorconfig.
  • Controlli: test architetturali (riferimenti fra progetti di SPEC §3, pacchetti di SPEC §1.2) e scripts/check-packages.sh. Verificato che un riferimento Core → Data e un pacchetto Newtonsoft.Json aggiunti di proposito fanno fallire sia i test sia lo script.
  • Web: pagina "in costruzione" in italiano con marca, icone e versione; 404 ed errore; /health/live, /health/ready, /health (ADR 0012); KHAEMHAT_URLS, KHAEMHAT_LOG_LEVEL.
  • Docker: docker/Dockerfile multi-stage, utente app non root allineato a PUID/PGID con setpriv (ADR 0013), postgresql-client-17 (PGDG), curl, tzdata, HEALTHCHECK, etichette OCI e Unraid, restore-system.sh nell'immagine (ADR 0017); entrypoint.sh, postgres/init.sql; deploy/docker-compose.yml e docker-compose.sqlite.yml.
  • Gitea Actions: ci.yml (build, test, immagine con smoke test, PostgreSQL 16/17 sui tag, controllo YAML), release.yml (immagine + release dal tag; salta il build se la versione è già nel registro, ADR 0015), wiki.yml.
  • Script: build.sh (anche icona versionata, ADR 0016), test.sh, run-dev.sh, publish-image.sh, publish-wiki.sh, stub per M1/M4/M12.
  • VS Code: .vscode/launch.json (debug con SQLite o PostgreSQL), tasks.json, extensions.json.
  • Documentazione: ADR 0012-0017, DEVELOPMENT.md con comandi e segreti CI, DEPLOY.md, STATUS.md, CHANGELOG.md (0.0.1), README, wiki (Installazione Docker, Backup, Aggiornamento, Changelog, Roadmap, Home).

Verifica locale

  • dotnet build -c Release -warnaserror: 0 warning, 0 errori; dotnet test: 27 test verdi.
  • App avviata come da launch.json: /health risponde con la versione, la home mostra la pagina "in costruzione".
  • Docker non verificato in locale (il daemon di Docker Desktop non partiva sulla macchina di sviluppo): l'immagine la costruisce e la prova il job Docker image di questa PR sul runner.

Closes #1, #2, #3, #4, #5, #114

🤖 Generated with Claude Code

Prima unità di sviluppo (milestone M0, versione 0.0.1): lo scheletro su cui si costruiscono le milestone successive. ### Cosa contiene - **Soluzione** `Khaemhat.sln`: i 10 progetti di SPEC §3 + 6 progetti di test MSTest; `Directory.Build.props/targets` (warning come errori, analyzer, documentazione XML, versione da tag git), Central Package Management con l'allowlist, `.editorconfig`. - **Controlli**: test architetturali (riferimenti fra progetti di SPEC §3, pacchetti di SPEC §1.2) e `scripts/check-packages.sh`. Verificato che un riferimento `Core → Data` e un pacchetto `Newtonsoft.Json` aggiunti di proposito fanno fallire sia i test sia lo script. - **Web**: pagina "in costruzione" in italiano con marca, icone e versione; 404 ed errore; `/health/live`, `/health/ready`, `/health` (ADR 0012); `KHAEMHAT_URLS`, `KHAEMHAT_LOG_LEVEL`. - **Docker**: `docker/Dockerfile` multi-stage, utente `app` non root allineato a `PUID`/`PGID` con `setpriv` (ADR 0013), `postgresql-client-17` (PGDG), `curl`, `tzdata`, `HEALTHCHECK`, etichette OCI e Unraid, `restore-system.sh` nell'immagine (ADR 0017); `entrypoint.sh`, `postgres/init.sql`; `deploy/docker-compose.yml` e `docker-compose.sqlite.yml`. - **Gitea Actions**: `ci.yml` (build, test, immagine con smoke test, PostgreSQL 16/17 sui tag, controllo YAML), `release.yml` (immagine + release dal tag; salta il build se la versione è già nel registro, ADR 0015), `wiki.yml`. - **Script**: `build.sh` (anche icona versionata, ADR 0016), `test.sh`, `run-dev.sh`, `publish-image.sh`, `publish-wiki.sh`, stub per M1/M4/M12. - **VS Code**: `.vscode/launch.json` (debug con SQLite o PostgreSQL), `tasks.json`, `extensions.json`. - **Documentazione**: ADR 0012-0017, `DEVELOPMENT.md` con comandi e segreti CI, `DEPLOY.md`, `STATUS.md`, `CHANGELOG.md` (0.0.1), README, wiki (Installazione Docker, Backup, Aggiornamento, Changelog, Roadmap, Home). ### Verifica locale - `dotnet build -c Release -warnaserror`: 0 warning, 0 errori; `dotnet test`: 27 test verdi. - App avviata come da `launch.json`: `/health` risponde con la versione, la home mostra la pagina "in costruzione". - Docker non verificato in locale (il daemon di Docker Desktop non partiva sulla macchina di sviluppo): l'immagine la costruisce e la prova il job *Docker image* di questa PR sul runner. Closes #1, #2, #3, #4, #5, #114 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Alby96 added this to the M0 — Bootstrap · v0.0.1 milestone 2026-11-11 11:53:57 +01:00
Alby96 added 1 commit 2026-11-11 11:53:57 +01:00
feat: bootstrap solution, Docker image and Gitea pipelines (M0)
CI / Build and test (SQLite) (pull_request) Successful in 43s
CI / PostgreSQL 16 integration (pull_request) Skipped
CI / PostgreSQL 17 integration (pull_request) Skipped
CI / YAML check (pull_request) Successful in 15s
CI / Docker image (pull_request) Successful in 59s
12277733f5
Start development with the skeleton every later milestone builds on, so
that code, image and release path exist and are verified from day one.

- Khaemhat.sln with the ten projects of SPEC section 3 and six MSTest
  projects; shared build rules with warnings as errors, analyzers and
  Central Package Management restricted to the allowlist.
- Architecture tests and scripts/check-packages.sh fail on any project
  reference or package that SPEC does not allow.
- Khaemhat.Web serves an Italian "under construction" page with the
  official icons and version, plus /health/live, /health/ready and
  /health (ADR 0012); honours KHAEMHAT_URLS and KHAEMHAT_LOG_LEVEL.
- docker/Dockerfile (non-root app user aligned to PUID/PGID by the
  entrypoint, pg_dump 17, healthcheck, OCI and Unraid labels) and
  compose files for PostgreSQL and a standalone SQLite demo.
- Gitea Actions: ci.yml (build, tests, image smoke test, PostgreSQL
  16/17 on tags, YAML check), release.yml (image and release from a
  vX.Y.Z tag, skipping versions already published) and wiki.yml.
- Development scripts, VS Code launch/tasks for debugging, and ADR
  0012-0017 deciding the M0 open points of docs/STATUS.md.

Closes #1, #2, #3, #4, #5, #114

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Alby96 merged commit 28e7a6e18a into main 2026-11-11 11:57:27 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: BalboSoft/Khaemhat#115