feat(infra): staging-deploy workflow + Docker CE staging runtime #133
No reviewers
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit!133
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/staging-cd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Staging CD (phase 1 of the VPS bring-up — box is live: Contabo 8 GB/96 GB Ubuntu 26.04, user deploy, reachable as
ssh failsulit)::staging, up -d, /health/ smoke). SSH via repo secrets STAGING_SSH_HOST/USER/KEY/KNOWN_HOSTS (provisioned via API); concurrency group cancels in-flight deploys.After merge: run staging-deploy (workflow_dispatch) to bring the app stack live; IdP stack + realm bootstrap + Auth:IdpEnabled flip follow in phase 2.
- .github/workflows/staging-deploy.yml: push-to-main (api/compose/workflow paths) + workflow_dispatch → build+push api:staging (kaz-setup composite, Containerfile) → SSH deploy: sync compose.yml + staging-deploy.sh, run it (pull :staging, up -d, /health/ smoke). SSH via repo secrets (STAGING_SSH_HOST/USER/KEY/KNOWN_HOSTS — provisioned); concurrency group cancels in-flight deploys. - scripts/staging-deploy.sh (runs ON the VPS): idempotent docker guard, first-run .env bootstrap with GENERATED secrets (POSTGRES_PASSWORD, Auth__TotpEncryptionKey), ASPNETCORE_ENVIRONMENT=Development on staging (auto-migrate ON — Production keeps deliberate migrations), tag pinning, /health/ smoke with log dump on failure. - compose.yml parameterized for both environments: POSTGRES_* + ASPNETCORE_ENVIRONMENT + API_IMAGE_TAG via .env (prod default: latest + Production, unchanged). - VPS bootstrapped out-of-band: Docker 29.9.3, deploy in docker group, forgejo registry login (PAT), ~/deploy/failsulit/{app,idp} scaffolded.