# ───────────────────────────────────────────────────────────────── # Workflow PocketBase Frontend — environment variables # # Paste this whole file into Coolify as your service's environment # variables (Build-time section). Update the placeholders below. # ───────────────────────────────────────────────────────────────── # Public URL where this app is reachable. Used by /onboarding/new to # build the link that gets sent to clients. IMPORTANT: must match the # exact external URL (scheme + host + port if non-default). No # trailing slash. # # Example: https://workflow.example.co.za # Example: https://workflow.coolify.your-domain.tld # NEXT_PUBLIC_BASE_URL=https://YOUR-COOLIFY-DOMAIN-HERE # PocketBase base URL. Where the PB admin UI lives. No trailing slash. # Server-side only — never exposed to the browser. # # Example: https://pb.agent.apphub.co.za # PB_URL=https://pb.agent.apphub.co.za # PocketBase superuser JWT. How to get it: # # 1. Open ${PB_URL}/_/ in a browser and sign in as the superuser # (email + password). # 2. Open DevTools → Application → Local Storage → look for the # key `pocketbase_auth` (PB v0.21+) or `__pb_superusers__/_` (older # builds). # 3. Copy the `token` field from the JSON. # # This token has full read/write access to every collection. Treat it # like a password — never commit it. Coolify's secret manager is the # right home. # # Example (yours will be different, do NOT reuse this): # PB_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... # PB_TOKEN=PASTE_YOUR_PB_SUPERUSER_JWT_HERE # Optional: secret pepper mixed into the SHA-256 hash of each client # onboarding token. Without this set, the code uses a static fallback # pepper baked into the build. Setting a real pepper means a leaked # PB row can't be reversed to the original URL without also stealing # the env var. # # Generate one with: node -e "console.log(require('crypto').randomBytes(32).toString('base64url'))" # ONBOARDING_TOKEN_PEPPER=OPTIONAL_RANDOM_32_BYTE_SECRET # Optional: server-side port override. Defaults to 3000 inside the # container; Coolify usually sets this automatically. # # PORT=3000 # Optional: NODE_ENV is set to `production` by Coolify's runtime # profile. The app handles both. # # NODE_ENV=production