railiance-apps/docs/forgejo-package-registry.md
tegwick a307041cac
All checks were successful
CI Smoke / host-smoke (push) Successful in 11s
CI Smoke / container-smoke (push) Successful in 2s
docs(forgejo): document automated package prune retention policy
Reference ACTIVITY-WP-0020 weekly prune lane and depth-3 retention.
2026-07-12 11:35:04 +02:00

88 lines
No EOL
2.9 KiB
Markdown

# Forgejo Package Registry (railiance01)
Workplan: `RAIL-HO-WP-0005` T07 · Decision: Option C (OCI + npm + generic)
Public host: `https://forgejo.coulomb.social`
Helm values: `helm/forgejo-registry-values.yaml` (`packages.ENABLED`, `ROOT_URL`).
## OCI (container images)
Registry API: `GET /v2/` (expect `401` + `Docker-Distribution-Api-Version`).
```bash
docker login forgejo.coulomb.social -u tegwick
docker tag IMAGE forgejo.coulomb.social/coulomb/REPO:TAG
docker push forgejo.coulomb.social/coulomb/REPO:TAG
```
Cluster pull (railiance01):
```bash
KUBECONFIG=~/.kube/config-hosteurope crictl pull forgejo.coulomb.social/coulomb/REPO:TAG
```
Smoke: `make forgejo-smoke`
## npm
Org registry: `https://forgejo.coulomb.social/api/packages/coulomb/npm/`
Workstation config (use a PAT with `read:package` / `write:package`; do not commit):
```bash
npm config set @coulomb:registry https://forgejo.coulomb.social/api/packages/coulomb/npm/
npm config set -- '//forgejo.coulomb.social/api/packages/coulomb/npm/:_authToken' "${FORGEJO_NPM_TOKEN}"
```
Publish (scoped package under `@coulomb/`):
```bash
npm publish --scope=@coulomb
# or explicit:
npm publish --scope=@coulomb --registry=https://forgejo.coulomb.social/api/packages/coulomb/npm/
```
Install:
```bash
npm install @coulomb/PACKAGE@VERSION
```
Probe package (T07 evidence): `@coulomb/forgejo-npm-probe@0.0.1`
Smoke: `make forgejo-npm-smoke` (requires `FORGEJO_NPM_TOKEN` or `/tmp/forgejo-tegwick-api-token`)
CI template: `railiance-enablement/workflows/npm-publish.yaml`
## Generic packages
Upload release artifacts via Forgejo UI or API (`/api/packages/{owner}/generic/...`).
Use for binaries, checksum files, and non-OCI release assets.
## Retention and backup
| Type | Storage | Backup | Cleanup |
| --- | --- | --- | --- |
| OCI | `/data/packages` in Forgejo PVC | `make forgejo-backup` (`forgejo dump`) | `make forgejo-package-prune` — keep **3** newest tags per package (weekly via activity-core) |
| npm | same | same | Same prune lane (`npm` type); manual `npm unpublish` still available |
| generic | same | same | Same prune lane (`generic` type) |
| PyPI | same | same | Same prune lane (`pypi` type) |
**Protected tags:** production image tags pinned in `helm/*-values.yaml` and
`charts/*/values.yaml` are never deleted even when outside the top 3.
**Automation:** `activity-core` activity `weekly-forgejo-package-prune` (Sunday
03:30 UTC). Policy: `railiance-platform/docs/forgejo-package-prune.md`.
Package blobs are included in daily `forgejo dump` (~1.3G with registry growth,
2026-07-12). Restore drills must verify package metadata after isolated restore (T09).
RPO/RTO for package data matches Forgejo backup policy: 24h / 4h
(`the-custodian/docs/forgejo-production-decisions.md` § Backup).
## Related
- `docs/forgejo-on-railiance01.md`
- `railiance-enablement/docs/forgejo-actions-workflow-templates.md`
- Gitea legacy reference: `~/railiance-forge/docs/gitea-package-registry.md`