Phase 2: Backend Scaffold + First Deploy
Goal: FastAPI skeleton running in prod — health endpoint responding, CI green, ArgoCD syncing. ImagePullBackOff resolves.
Owner: Dev agent
Repo:
forgejo_admin/mcd-tracker-apiDepends on: Phase 1 (COMPLETED — namespace, Harbor, ArgoCD app all live)
Scope
Scaffold the FastAPI app following the basketball-api pattern exactly. Push first image to Harbor. ArgoCD auto-deploys. Health endpoint responds.
- Scaffold FastAPI app:
- Add
Dockerfile— multi-stage Python build (builder + runtime), expose 8000 - Add
.woodpecker.yaml— two steps:test(ruff + pytest) andbuild-and-push(kaniko to Harbor). Use${CI_COMMIT_SHA}as image tag. - Activate Woodpecker on mcd-tracker-api repo
- Add Harbor secrets to Woodpecker repo settings (
harbor_username,harbor_password— get fromtofu output) - Push to main → green pipeline → Harbor image → ArgoCD auto-deploys
Architecture Touch
arch-deployment-mcd-tracker — this phase populates the API pod in the deployment diagram. arch-dataflow-mcd-tracker — health endpoint is the first runtime flow (trivial). No diagram updates needed.Verification
curl https://mcd-tracker.tail5b443a.ts.net/healthzreturns 200- Woodpecker pipeline green on mcd-tracker-api
- Harbor shows
mcd-tracker/apiimage with SHA tag - ArgoCD app
mcd-trackerhealthy (no more ImagePullBackOff) - Pods: mcd-tracker (1/1 Running), postgres (1/1 Running)
- pending
Related
plan-mcd-tracker— parent planphase-mcd-tracker-1-service-onboarding— depends on (infra ready)arch-deployment-mcd-tracker— deployment diagram