# Environment Variables

Copy `.env.example` to `.env`. Required variables:

| Variable | Purpose |
|---|---|
| `DATABASE_URL` | PostgreSQL connection string |
| `GOOGLE_PROJECT_ID`, `GOOGLE_CLIENT_EMAIL`, `GOOGLE_PRIVATE_KEY` | Firebase Admin SDK (FCM) |
| `NEXT_PUBLIC_VAPID_PUBLIC_KEY`, `VAPID_PRIVATE_KEY` | Web Push |
| `WS_APIKEY` | WebSocket/file storage API key |
| `WIBU_REALTIME_KEY` | Real-time communication |
| `FCM_KEY` | Firebase Cloud Messaging |

## Deployment (MCP `deploy-stg`)

Diisi di `.env` lokal (jangan commit `GH_TOKEN`). `.mcp.json` me-reference via `${GH_TOKEN}`.

| Variable | Purpose |
|---|---|
| `GH_TOKEN` | GitHub PAT dengan scope `repo` + `workflow` |
| `GH_URL` | Repo build target (`owner/repo` atau full URL) |
| `BASE_URL` | Base URL deployment stg (untuk verifikasi versi) |
| `VERSION_PATH` | Endpoint cek versi (default `/api/version-app`) |
| `STACK_NAME` | Nama stack di Portainer |
