- prisma/schema.prisma: tambah binaryTargets debian & linux-musl untuk Docker - src/lib/prisma.ts: pakai global singleton di dev & prod, hapus eager $connect() - src/lib/firebase-admin.ts: lazy initialization agar tidak crash saat build time - .env.example: lengkap dengan semua env variable + connection_limit & pool_timeout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
54 lines
1.7 KiB
Plaintext
54 lines
1.7 KiB
Plaintext
# ==============================
|
|
# Database
|
|
# ==============================
|
|
# Tambahkan connection_limit dan pool_timeout untuk mencegah connection exhaustion
|
|
DATABASE_URL="postgresql://user:password@localhost:5432/dbname?connection_limit=10&pool_timeout=20"
|
|
|
|
# ==============================
|
|
# Auth / Session
|
|
# ==============================
|
|
WIBU_PWD="your_wibu_password"
|
|
NEXT_PUBLIC_BASE_TOKEN_KEY="your_token_key"
|
|
NEXT_PUBLIC_BASE_SESSION_KEY="your_session_key"
|
|
|
|
# ==============================
|
|
# Payment Gateway (Midtrans)
|
|
# ==============================
|
|
Client_KEY="your_midtrans_client_key"
|
|
Server_KEY="your_midtrans_server_key"
|
|
|
|
# ==============================
|
|
# Maps
|
|
# ==============================
|
|
MAPBOX_TOKEN="your_mapbox_token"
|
|
|
|
# ==============================
|
|
# Realtime (WebSocket)
|
|
# ==============================
|
|
WS_APIKEY="your_ws_api_key"
|
|
NEXT_PUBLIC_WIBU_REALTIME_TOKEN="your_realtime_token"
|
|
|
|
# ==============================
|
|
# Email (Resend)
|
|
# ==============================
|
|
RESEND_APIKEY="your_resend_api_key"
|
|
|
|
# ==============================
|
|
# WhatsApp
|
|
# ==============================
|
|
WA_SERVER_TOKEN="your_wa_server_token"
|
|
|
|
# ==============================
|
|
# Firebase Admin (Push Notification)
|
|
# ==============================
|
|
FIREBASE_ADMIN_PROJECT_ID="your_firebase_project_id"
|
|
FIREBASE_ADMIN_CLIENT_EMAIL="your_firebase_client_email@project.iam.gserviceaccount.com"
|
|
# Private key: salin dari service account JSON, ganti newline dengan \n
|
|
FIREBASE_ADMIN_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nYOUR_PRIVATE_KEY_HERE\n-----END PRIVATE KEY-----\n"
|
|
|
|
# ==============================
|
|
# App
|
|
# ==============================
|
|
NEXT_PUBLIC_API_URL="http://localhost:3000"
|
|
LOG_LEVEL="info"
|