Staging Deployment
Operational staging runbook — deploy, migrate, seed, and validate.
Staging Deployment
ByteBite staging is active on BYTEBITE-APP-01 (88.99.0.118) under Dokploy. This is a concise operational runbook; infrastructure details are in Infrastructure.
Verified: 2026-09-08
Status
| Item | Value |
|---|---|
| Environment | staging |
| Host | 88.99.0.118 |
| Dokploy project | ByteBite / staging / "ByteBite Staging" |
| Compose | compose.deploy.yml |
| Branch | main (On Push trigger) |
| Indexing | noindex, nofollow (all public apps) |
Prerequisites
- Dokploy access at
dokploy.getbytebite.co - GitHub connection: GitHub-ByteBiteCo
- Dokploy-managed PostgreSQL service attached (internal network)
- Environment variables configured in Dokploy (see below)
Required environment variables
Set in Dokploy — never commit values.
| Variable | Service | Required |
|---|---|---|
BYTEBITE_DEPLOY_ENV | api, storefront, docs | staging |
DATABASE_URL | api | Yes |
NODE_ENV | all | production |
API_INTERNAL_URL | storefront | Default http://api:3001 in compose |
LOG_LEVEL | api | Optional (default info) |
SENTRY_DSN | api | Optional |
Full inventory: Secrets.
Deploy
Pushes to main trigger Dokploy build and deploy automatically.
Manual redeploy: Dokploy UI → ByteBite Staging → Deploy.
Dokploy builds from compose.deploy.yml and starts four services: api, storefront, dashboard, docs.
Post-deploy: migrations
Migrations are explicit — not run on API startup.
Inside the running api container:
node db/dist/migrate.jsOr from a machine with staging DATABASE_URL:
pnpm deploy:db:migrateRun after every deploy that includes schema changes.
Post-deploy: staging seed (fresh DB only)
Creates Luigi and Mario staging tenants:
| Hostname | Restaurant |
|---|---|
luigi.staging.getbytebite.co | Pizzeria Luigi |
mario.staging.getbytebite.co | Mario's Restaurant |
node db/dist/seed-staging.jsSafe to re-run (upserts). Do not run against production or local dev databases.
Routing summary
Explicit domains (Dokploy UI)
| Host | Service |
|---|---|
staging.getbytebite.co | storefront |
luigi.staging.getbytebite.co | storefront |
mario.staging.getbytebite.co | storefront |
dashboard.staging.getbytebite.co | dashboard |
api.staging.getbytebite.co | api |
docs.staging.getbytebite.co | docs |
Same-origin /api on luigi, mario, and dashboard (StripPrefix /api → api:3001) — configured in Dokploy UI.
Wildcard tenants (compose.deploy.yml)
<slug>.staging.getbytebite.co → storefront (priority 10) and /api → api (priority 20) via Traefik labels. Uses letsencrypt-cloudflare wildcard TLS.
Validate
Run the full Validation smoke test suite after every deploy or infrastructure change.
Quick check:
curl -s "https://api.staging.getbytebite.co/health"
curl -s "https://luigi.staging.getbytebite.co/api/health"Rollback
| Scenario | Action |
|---|---|
| Bad application code | Redeploy previous Git commit in Dokploy |
| Bad migration | No DB restore path yet — fix forward or recreate DB + migrate + seed |
| Routing/TLS broken | See Disaster recovery |
Staging-only behavior
BYTEBITE_DEPLOY_ENV=staging→X-Robots-Tag: noindex, nofollowon storefront and docs- Dashboard always sends noindex (nginx config)
- Unknown wildcard tenants: storefront shows "Restaurant not found" (HTTP 200 — known gap); API returns 404
- No object storage, mail, or production integrations
Deep reference
| Topic | Page |
|---|---|
| Full infrastructure | Infrastructure overview |
| Dokploy config | Dokploy |
| Traefik / wildcard | Traefik |
| TLS / ACME | TLS |
| Database | Database |
| Security | Security |
| Known gaps | Known gaps |