- Remove app submodules (hub/scraper/tools/llm-api/plugins) — apps are now standalone repos with their own flake.nix + deploy.yml CI - Delete monorepo CI: nix-build.yml matrix, update-submodule.yml, lint, security, flakehub-publish — replaced by infra-only caddy-deploy.yml - Sync Caddyfile.prod with live /etc/caddy/Caddyfile (add wiki. + mcp. blocks) - Prune legacy Docker/Traefik/Dapr/NATS/otel + scripts/root tooling - Docs: rename ADR 0001 superseded, add ADR 0003 (repo rename + split CI), update add-new-app, infra README, troubleshooting
47 lines
2.0 KiB
Markdown
47 lines
2.0 KiB
Markdown
# ADR 0003: Rename Repositori & Pisahkan CI per Aplikasi
|
|
|
|
## Status
|
|
|
|
Accepted (2026-08-28)
|
|
|
|
## Context
|
|
|
|
Monorepo `asepharyana-hub` (app submodule + infra + CI terpusat) punya kelemahan:
|
|
- CI build+deploy semua app menyatu di parent (`nix-build.yml` matrix) — setiap push app
|
|
butuh 2 hop (notify-parent → update-submodule → nix-build), rawan drift pointer.
|
|
- Nama `asepharyana-hub` ambigu (parent & app prefix sama), dan submodule menambah kompleksitas.
|
|
|
|
## Decision
|
|
|
|
Rombak total:
|
|
|
|
| Lama | Baru | Peran |
|
|
|------|------|-------|
|
|
| `asepharyana-hub` | `asepharyana/infra` | Reverse proxy (Caddy) + firewall + systemd + docs. CI: caddy-deploy saja. |
|
|
| `asepharyana-hub-hub` | `asepharyana/hub` | Portfolio SPA. CI mandiri (deploy.yml). |
|
|
| `asepharyana-hub-scraper` | `asepharyana/scraper` | Rust scraper API. CI mandiri. |
|
|
| `asepharyana-hub-tools` | `asepharyana/tools` | Tools stack (gateway/workers/frontend). CI mandiri. |
|
|
| `asepharyana-hub-llm-api` | `asepharyana/llm-api` | Rust LLM API. CI mandiri. |
|
|
| `asepharyana-hub-guide` | `asepharyana/hub-guide` | (tidak di-root; plugin guide — diarsipkan) |
|
|
|
|
Setiap app repo mendapat:
|
|
- `flake.nix` (derivasi build sendiri, tanpa fetchGit submodule)
|
|
- `.github/workflows/deploy.yml` (nix build → nix copy → nix-env --profile → systemctl restart)
|
|
- Secret `SSH_PRIVATE_KEY`, `VPS_HOST`, `VPS_USER`
|
|
|
|
Parent `infra` mendapat:
|
|
- Hapus semua submodule + `update-submodule.yml` + matrix `nix-build.yml`
|
|
- `.github/workflows/caddy-deploy.yml` (sync Caddyfile → reload → verify)
|
|
- Docs diarahkan ulang.
|
|
|
|
## Consequences
|
|
|
|
- **Positif**: CI per-app independen & cepat; parent kecil; tanpa submodule = tanpa fetchGit pin
|
|
/ dubious-ownership / pointer churn. Rename GitHub auto-redirect URL lama.
|
|
- **Negatif**: koordinasi manual bila app butuh port baru di Caddy; workflow lama di
|
|
downstream (skill/cron) perlu update referensi.
|
|
|
|
## Referensi
|
|
|
|
- `docs/add-new-app.md` — proses menambah service baru
|
|
- `infra/caddy/Caddyfile.prod` — pola site block |