olsitec-foundation platform repo
Follow-up to the crypto-secret mirror: Forgejo's [security] SECRET_KEY was EMPTY because the bootstrap skips the web installer (INSTALL_LOCK), which is what normally generates it. An empty SECRET_KEY weakens at-rest encryption of 2FA secrets, push-mirror/migration passwords, and OAuth app secrets. Generate it with @pulumi/random (it is a plain high-entropy string, not a format-constrained JWT — so unlike INTERNAL_TOKEN/JWT_SECRET it CAN be random-generated, matching CONTRACT_002 §2.3) and inject via FORGEJO__security__SECRET_KEY; env-to-ini overwrites it in the volume's app.ini while leaving Forgejo's own INTERNAL_TOKEN + JWT secrets untouched. The GATE-B mirror then captures the real value into Vault. Done now while the egg is fresh (no encrypted data yet) → no re-encryption. Validated live: app.ini + Vault forgejoSecretKey = 40 chars; forge healthz pass + https 200; scp-form clone works; idempotent at 44 unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .forgejo/workflows | ||
| backup | ||
| bootstrap | ||
| containers/caddy-cloudflare | ||
| documentation | ||
| dr | ||
| offsite-backup | ||
| packages | ||
| preflight | ||
| provision | ||
| .gitignore | ||
| bun.lock | ||
| package.json | ||
| README.md | ||
| VERSIONS | ||
olsitec-foundation
The self-hosting platform "egg": a single Pulumi project that brings up Forgejo (+ Actions +
OCI/npm registry), PostgreSQL, HashiCorp Vault, RustFS (S3), and a reverse proxy as plain OCI
containers on one VM — recoverable from {a VM, this repo, the master passphrase}.
This is Layer 0. Kubernetes, ArgoCD and everything else are Layer-1 consumers of this foundation (see ADR-004).
Layout
bootstrap/— the egg Pulumi project (phases, components, config).packages/— shared, publishable Pulumi modules (@olsitec/pulumi-*).preflight/— host & toolchain validation (run before any deploy).backup/,dr/— backup + disaster-recovery automation..forgejo/workflows/— CI (preflight, pulumi preview/up, backup-verify).documentation/— planning, ADRs, contracts, baseline overlay. Readdocumentation/000_baseline.mdanddocumentation/000_TOPOLOGY.mdfirst.
Status
Planning complete (PLAN-001 vision, PLAN-002 strategy, ADR-004/005 accepted). Implementation not yet started — next step is T00 (contracts) per PLAN-002 §10.
Recovery in one line
git clone this repo → set PULUMI_CONFIG_PASSPHRASE → ./preflight/preflight.sh →
pulumi up → restore latest offsite backup. Full procedure: dr/RUNBOOK.md (TBD, task T13).