ByteBite Docs
Deployment

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

ItemValue
Environmentstaging
Host88.99.0.118
Dokploy projectByteBite / staging / "ByteBite Staging"
Composecompose.deploy.yml
Branchmain (On Push trigger)
Indexingnoindex, 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.

VariableServiceRequired
BYTEBITE_DEPLOY_ENVapi, storefront, docsstaging
DATABASE_URLapiYes
NODE_ENVallproduction
API_INTERNAL_URLstorefrontDefault http://api:3001 in compose
LOG_LEVELapiOptional (default info)
SENTRY_DSNapiOptional

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.js

Or from a machine with staging DATABASE_URL:

pnpm deploy:db:migrate

Run after every deploy that includes schema changes.

Post-deploy: staging seed (fresh DB only)

Creates Luigi and Mario staging tenants:

HostnameRestaurant
luigi.staging.getbytebite.coPizzeria Luigi
mario.staging.getbytebite.coMario's Restaurant
node db/dist/seed-staging.js

Safe to re-run (upserts). Do not run against production or local dev databases.

Routing summary

Explicit domains (Dokploy UI)

HostService
staging.getbytebite.costorefront
luigi.staging.getbytebite.costorefront
mario.staging.getbytebite.costorefront
dashboard.staging.getbytebite.codashboard
api.staging.getbytebite.coapi
docs.staging.getbytebite.codocs

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.

Details: Traefik, DNS.

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

ScenarioAction
Bad application codeRedeploy previous Git commit in Dokploy
Bad migrationNo DB restore path yet — fix forward or recreate DB + migrate + seed
Routing/TLS brokenSee Disaster recovery

Staging-only behavior

  • BYTEBITE_DEPLOY_ENV=stagingX-Robots-Tag: noindex, nofollow on 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

TopicPage
Full infrastructureInfrastructure overview
Dokploy configDokploy
Traefik / wildcardTraefik
TLS / ACMETLS
DatabaseDatabase
SecuritySecurity
Known gapsKnown gaps

On this page