feat(mcp-docugen): scaffold service + Docker stack con gateway Caddy

Task 0 del piano (adattato a workspace uv):
- services/mcp-docugen/: pyproject.toml, src/mcp_docugen/, tests/unit+integration/,
  README, .env.example. Package rinominato da docugen_mcp -> mcp_docugen.
- Root pyproject.toml: aggiunto services/mcp-docugen a workspace members.
- .python-version: 3.11
- uv.lock committato.

Docker stack stile CerberoSuite/Cerbero con prefisso "arca-":
- docker/base.Dockerfile -> arca-base:latest
- docker/mcp-docugen.Dockerfile -> arca-mcp-docugen:dev (porta interna 9100,
  label arca.service, runtime multi-stage, user non-root, healthcheck)
- docker-compose.yml root: gateway Caddy unica porta host (8080) + mcp-docugen
  su rete interna. Security defaults cap_drop ALL, no-new-privileges, read_only
  ove applicabile, restart unless-stopped.
- gateway/Caddyfile: reverse proxy /mcp-docugen/* -> mcp-docugen:9100 + landing.
- gateway/public/index.html: landing page minimale.

.env.example root aggiornato con DOCUGEN_API_KEY + OPENROUTER_API_KEY condivisa.

Task 1-12 (implementazione TDD effettiva) ancora da fare.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-21 12:16:22 +02:00
parent 7b169fb8db
commit c5e84a578b
16 changed files with 1692 additions and 8 deletions
+37
View File
@@ -0,0 +1,37 @@
# mcp-docugen
MCP server per generazione documenti Markdown da template + LLM (OpenRouter).
Design: [`../../docs/mcp-docugen-design.md`](../../docs/mcp-docugen-design.md)
Plan: [`../../docs/mcp-docugen-implementation.md`](../../docs/mcp-docugen-implementation.md)
## Dev
Dalla root del repo:
```bash
uv sync --all-groups
uv run --package mcp-docugen mcp-docugen
```
## Test
```bash
uv run --package mcp-docugen pytest services/mcp-docugen
```
## Docker
```bash
# build (dalla root)
docker build -f docker/base.Dockerfile -t arca-base:latest .
docker build -f docker/mcp-docugen.Dockerfile -t arca-mcp-docugen:dev .
# o via compose
docker compose build mcp-docugen
docker compose up mcp-docugen
```
## Env
Vedi `.env.example`. Variabili obbligatorie: `API_KEY`, `OPENROUTER_API_KEY`, `PUBLIC_BASE_URL`.