Lewati ke konten utama

Deployment Guide

Deployment Flows​

The marketplace (web frontend + NestJS backend) deploys through CI via DigitalOcean Container Registry (DOCR) + Dokploy on a VPS. Mobile deploys manually to app stores.

Web and Backend (CI-driven)​

Merge to develop (staging) or main (production)
git push origin develop # → CI builds images → pushes to DOCR → Dokploy deploys to staging
git push origin main # → CI builds images → pushes to DOCR → Dokploy deploys to production

CI builds separate Docker images for the frontend (nginx-served Vite SPA) and backend (NestJS service), pushes them to DOCR, then signals Dokploy to pull and restart. Dokploy does not build images; it only pulls.

Database migrations apply automatically during backend startup on each deploy. Ensure any migration was applied clean on staging before merging to main.

Mobile (Flutter → App Stores)​

Build and release
# iOS
flutter build ios --release
# → Upload to App Store Connect → TestFlight → Submit

# Android
flutter build appbundle --release
# → Upload to Google Play Console → Internal Testing → Submit

Pre-Deployment Checklist​

  • pnpm preflight passes (typecheck + lint + tests)
  • No console.log left in production code
  • No hardcoded API keys or secrets
  • No hardcoded colors (use theme tokens)
  • Error states handled with user-friendly messages
  • Loading states shown during async operations
  • Mobile responsive design verified
  • Bahasa Indonesia text reviewed
  • New API endpoints have rate limiting
  • New API endpoints have input validation (Zod / class-validator)
  • Any new DB migration has a .down.sql rollback and applied clean on staging

Post-Deployment Checklist​

  • Production site loads correctly
  • API health endpoint returns 200
  • Critical user flows work (browse → view → buy → pay → ship → confirm)
  • No new errors in Dokploy container logs
  • Payment webhooks still processing (check Xendit dashboard)

Rollback Strategy​

PlatformHow to Rollback
WebRedeploy the previous DOCR image tag via Dokploy, or git revert the merge commit and push to main to re-trigger CI
BackendSame as web — redeploy previous image or revert and push
MobileCannot easily rollback; prepare a hotfix build
Deploy Order
  • Adding endpoints: Deploy backend BEFORE frontend
  • Removing endpoints: Deploy frontend BEFORE backend
  • Both changed: Backend first, verify health, then frontend

Notes​

  • This docs site (docs.pasarseken.id, SEKENDocs) is a separate Docusaurus/Vercel project and is unaffected by the marketplace's Dokploy deployment.
  • For the full developer walkthrough, see Developer: Deployment →.