.env.example 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Entra ID / OIDC
  2. ENTRA_TENANT_ID=
  3. ENTRA_CLIENT_ID=
  4. ENTRA_CLIENT_SECRET=
  5. # Base URL the app is reachable at (no trailing slash).
  6. # Used to build the OIDC redirect URI {APP_BASE_URL}/auth/callback
  7. APP_BASE_URL=http://localhost:8080
  8. # Path to the SQLite database file inside the container. Leave as-is unless
  9. # you have a specific reason to change it. The parent dir is the mounted
  10. # volume (/var/www/data).
  11. DB_PATH=/var/www/data/app.sqlite
  12. # Session handler files directory.
  13. SESSION_PATH=/var/www/data/sessions
  14. # 'production' disables verbose error output. Anything else is treated as dev.
  15. APP_ENV=production
  16. # ---------------------------------------------------------------------------
  17. # OIDC bootstrap admin (optional) — nominate the very first administrator up
  18. # front, so a public-facing first deploy can't be land-grabbed by another
  19. # tenant member who happens to sign in before you. Auto-promotion to admin
  20. # happens via OIDC iff no admin exists yet AND the signing user matches one
  21. # of the values below (case-insensitive). With both variables blank, the
  22. # OIDC path NEVER auto-promotes — seed the first admin via the local-admin
  23. # fallback below, or by manually flipping is_admin in the database.
  24. # Set BOOTSTRAP_ADMIN_OID to the Entra `oid` claim (a GUID, immutable) when
  25. # you know it; BOOTSTRAP_ADMIN_EMAIL is accepted as a fallback when you only
  26. # have the email.
  27. # ---------------------------------------------------------------------------
  28. BOOTSTRAP_ADMIN_OID=
  29. BOOTSTRAP_ADMIN_EMAIL=
  30. # ---------------------------------------------------------------------------
  31. # Local admin (optional) — lets you sign in without Entra, e.g. during initial
  32. # setup or for a fully on-prem deployment. Set BOTH email and the password
  33. # hash to enable; leave blank to disable. The password is verified with PHP's
  34. # password_verify() against LOCAL_ADMIN_PASSWORD_HASH, so .env never contains
  35. # the password itself. Generate the hash with:
  36. # docker run --rm php:8.3-cli php -r \
  37. # 'echo password_hash(readline("Password: "), PASSWORD_DEFAULT), PHP_EOL;'
  38. # (Or `php -r '...'` directly if you have PHP 8 on the host.) Paste the
  39. # resulting `$2y$...` string verbatim. Single quotes recommended in .env so
  40. # the `$` in the hash isn't interpreted by the shell.
  41. # The resulting user is stored with entra_oid = "local:<email>" and is_admin=1.
  42. # This path is itself an explicit env-bootstrap and does not require the
  43. # BOOTSTRAP_ADMIN_* variables above.
  44. # ---------------------------------------------------------------------------
  45. LOCAL_ADMIN_EMAIL=
  46. LOCAL_ADMIN_PASSWORD_HASH=
  47. LOCAL_ADMIN_NAME=Local Admin