Bỏ qua để đến nội dung

Operations and troubleshooting

Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.

  • GET /api/v1/health — liveness probe (HealthController, throttling skipped). Used by the Dockerfile HEALTHCHECK.
  • Migrations: npm run backend:migrate from repo root (Turbo → backend migration:run).
  • DB_ENABLED=false — backend can run tests or boot without MySQL in some configurations; production must have DB_ENABLED=true and valid credentials.
SymptomThings to check
Browser: CORS errorsCORS_ORIGIN must include the SPA origin (scheme + host + port).
401 after idleAccess JWT expired; client should refresh via /auth/.../refresh. If refresh fails, re-login.
403 on admin/vendor APIsModule guard (modules claim) or store / tenant rule — see Tenancy — stores and outlets.
Swagger 404SWAGGER_ENABLED=false or wrong path — default UI is /{SWAGGER_PATH} (usually /docs).
Static UI shows blank API callsProduction: ensure VITE_API_URL at build time matches how the browser reaches the API, or use empty string for same-origin (Docker default).
Terminal webhook rejectedPer-store x-pos-terminal-key — see POS and payment webhooks.

Add internally: DB failover, external PSP outages, log shipping (e.g. CloudWatch, Datadog), and on-call routing.