# --------------------------------------------------------------------------- # PIG — environment # Copy to .env and fill in. Never commit .env. # --------------------------------------------------------------------------- # --- Database --------------------------------------------------------------- # PIG owns this database exclusively. Do not point it at a database shared with # another application. DATABASE_URL=postgres://pig:CHANGEME@localhost:5432/pig # # Compose only, and REQUIRED there: docker-compose.yml interpolates it with # `${POSTGRES_PASSWORD:?…}`, so every compose command — including # `docker compose config` — fails outright until it is set. It is also half of # the DATABASE_URL compose builds for the containers, which is why running from # source needs the line above and running in containers needs this one. # Generate a fresh one; never reuse another service's. POSTGRES_PASSWORD=CHANGEME POSTGRES_USER=pig POSTGRES_DB=pig # --- Auth (Supabase) -------------------------------------------------------- # PIG uses Supabase for authentication ONLY. It stores no passwords and issues # no sessions of its own; it verifies incoming JWTs against the project JWKS. # # IMPORTANT: authorization does NOT follow from having a Supabase account. # A user must also have a row in PIG's `users` table. If this Supabase project # is shared with another application, that application's users get nothing here # until they are explicitly invited. SUPABASE_URL=https://YOUR_PROJECT_REF.supabase.co SUPABASE_ANON_KEY= # Service key is only needed for administrative user provisioning. Omit it and # PIG runs fine in invite-only mode. Treat it as the most powerful secret here. SUPABASE_SERVICE_KEY= # --- Auth: on-premises (OIDC) --------------------------------------------- # Set PIG_OIDC_ISSUER to authenticate against your own identity provider — # Okta, Entra, Keycloak, Auth0, Authentik, Google Workspace, anything # standards-compliant. It TAKES PRECEDENCE over the Supabase values above, so # an on-prem install can leave those in place. # # PIG never sees a password. It verifies the token your provider issued and # reads two things: a stable subject, and an email. Everything else — teams, # roles, capabilities — is PIG's own data keyed on that subject, so users are # provisioned in PIG by invite, not by your directory. PIG_OIDC_ISSUER= # Optional. Discovered from the issuer's /.well-known/openid-configuration when # omitted. Set it to skip discovery entirely on an air-gapped network. PIG_OIDC_JWKS_URI= # STRONGLY recommended. Without it, a token your provider issued for ANY other # application in the same tenant is accepted here as a PIG session. PIG_OIDC_AUDIENCE= # Comma-separated, in preference order. Defaults to email,preferred_username,upn # which covers most providers; Entra sometimes needs upn first. PIG_OIDC_EMAIL_CLAIMS= # --- Application ------------------------------------------------------------ PIG_PORT=8920 PIG_PUBLIC_URL=http://localhost:8920 NODE_ENV=development # --- Learn videos, hosted by PIG --------------------------------------------- # PIG serves its own Learn videos from disk, as a native