Staging Deployment
Sprint 24 Actual Staging Deployment and QA
Use this when: preparing or auditing the first actual staging deployment for `https://staging-app.submicrons.net`.
preparing or auditing the first actual staging deployment for `https://staging-app.submicrons.net`.
Use this when: preparing or auditing the first actual staging deployment for https://staging-app.submicrons.net.
Chosen Staging Target
Sprint 23 already prepared Dockerfiles and docker-compose.staging.yml. Until a managed platform is explicitly selected, Sprint 24 uses the practical assumption of a VPS or Docker host running:
webcontainer on internal port3000.docscontainer on internal port3001.- PostgreSQL staging database outside the application containers or as a managed staging database.
- Reverse proxy or platform load balancer terminating HTTPS for
staging-app.submicrons.net.
This is staging only. Production deployment remains out of scope.
Deployment Steps
- Provision a staging-only PostgreSQL database.
- Create an untracked
.env.stagingfrom.env.staging.example. - Replace placeholders in the host secret store only.
- Keep all external integration flags disabled.
- Run environment validation.
- Build containers with
Dockerfile.webandDockerfile.docs. - Apply migrations with deploy-mode migrations.
- Run seed only after confirming the target database is staging/demo.
- Start
docker compose -f docker-compose.staging.yml up -d --build. - Check
/api/health,/api/ready, login, docs, and smoke tests.
Rollback Steps
- Stop rollout and notify the owner.
- Preserve logs and the failing image/tag.
- Revert to the previous image or branch.
- Restore the database only after approval and only from a verified staging backup.
- Re-run
/api/health,/api/ready, login, smoke tests, and manager rehearsal.
Environment Requirements
APP_ENV=stagingAPP_URL=https://staging-app.submicrons.netBETTER_AUTH_URL=https://staging-app.submicrons.netAUTH_TRUST_HOST=true- staging-only
DATABASE_URL - external integration flags set to
false - no production secrets
- no real customer exports or private import files
Domain and HTTPS
Create DNS for staging-app.submicrons.net to point at the staging reverse proxy or platform hostname. HTTPS is required for staging auth cookies. Staging redirects must stay relative or target the staging host; they must not redirect to localhost.
Current Sprint 24 Status
The repository is prepared for this target locally. This Codex session did not deploy the public staging host because no VPS/platform credentials, DNS access, TLS configuration, or staging database secret were available in the workspace.
Developer Details
- Source
- apps/docs/content/staging-deployment/sprint-24-actual-staging-deployment.md
- Owner
- Platform / Operations
- Status
- Archived
- Module
- Staging Deployment
- Related route
- /api/health