Lewati ke konten utama

Deployment Runbook

Strategi Deploy (rekomendasi)

  1. Build artifact backend + frontend assets.
  2. Jalankan migration terkontrol.
  3. Restart worker queue.
  4. Health check endpoint kritikal.

Checklist Pre-Deploy

  • Backup DB
  • Backup file storage (storage/app)
  • Review migration fix/update/regenerate impact
  • Validasi env vars (DB, mail, firebase, queue)
  • Jalankan test minimal + lint

Langkah Deploy Backend

composer install --no-dev --optimize-autoloader
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan migrate --force
npm ci
npm run production

Queue Operations

php artisan queue:restart
# atau supervisor restart worker

Rollback Plan

  1. php artisan migrate:rollback --step=1 (hati-hati migration data patch).
  2. Restore DB backup jika migration irreversible.
  3. Restore storage bila ada perubahan file penting.

Post-Deploy Validation

  • Login admin berhasil.
  • List SPB/PO/Pembayaran terbuka normal.
  • Endpoint API login + list project OK.
  • Queue memproses job tanpa gagal.

Catatan Verifikasi

  • Status: Partial
  • Scope: Pipeline CI/CD belum terdefinisi di repo; runbook saat ini prosedur manual.
  • Action: Tambahkan lampiran jalur deploy per environment (manual vs pipeline) saat tersedia.