1
0

.env.example 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # =============================================================================
  2. # IRDB — IP Reputation Database — environment configuration
  3. # =============================================================================
  4. # Copy this file to `.env` and fill in the blanks.
  5. # Generate 32-byte hex secrets with: openssl rand -hex 32
  6. # =============================================================================
  7. # -----------------------------------------------------------------------------
  8. # Shared (consumed by both api and ui containers)
  9. # -----------------------------------------------------------------------------
  10. # 32-byte hex string. The api uses this to authenticate the ui's calls;
  11. # the ui presents it on every API request together with X-Acting-User-Id.
  12. UI_SERVICE_TOKEN=
  13. # -----------------------------------------------------------------------------
  14. # api container
  15. # -----------------------------------------------------------------------------
  16. APP_ENV=production # development | production
  17. LOG_LEVEL=info
  18. APP_SECRET= # 32-byte hex; used internally for signing things like ETags
  19. # Database
  20. DB_DRIVER=sqlite # sqlite | mysql
  21. DB_SQLITE_PATH=/data/irdb.sqlite
  22. DB_MYSQL_HOST=
  23. DB_MYSQL_PORT=3306
  24. DB_MYSQL_DATABASE=
  25. DB_MYSQL_USERNAME=
  26. DB_MYSQL_PASSWORD=
  27. # OIDC role mapping (defaults applied if no group mapping matches)
  28. OIDC_DEFAULT_ROLE=viewer # viewer | none
  29. # Reputation engine
  30. SCORE_RECOMPUTE_INTERVAL_SECONDS=300
  31. SCORE_REPORT_HARD_CUTOFF_DAYS=365
  32. # Internal jobs
  33. INTERNAL_JOB_TOKEN= # 32-byte hex
  34. JOB_RECOMPUTE_MAX_RUNTIME_SECONDS=240
  35. JOB_RECOMPUTE_MAX_ROWS_PER_TICK=5000
  36. JOB_AUDIT_RETENTION_DAYS=180
  37. JOB_GEOIP_REFRESH_INTERVAL_DAYS=7
  38. # GeoIP
  39. GEOIP_ENABLED=true
  40. GEOIP_COUNTRY_DB=/data/geoip/GeoLite2-Country.mmdb
  41. GEOIP_ASN_DB=/data/geoip/GeoLite2-ASN.mmdb
  42. MAXMIND_LICENSE_KEY=
  43. # CORS — origin of the ui container (or future SPA frontend)
  44. UI_ORIGIN=http://localhost:8080
  45. # Rate limiting (public API)
  46. API_RATE_LIMIT_PER_SECOND=60
  47. # -----------------------------------------------------------------------------
  48. # ui container
  49. # -----------------------------------------------------------------------------
  50. # (APP_ENV / LOG_LEVEL above are reused; the ui reads its own copies of those.)
  51. UI_SECRET= # 32-byte hex; signs session cookies
  52. PUBLIC_URL=http://localhost:8080
  53. # Where the ui finds the api (internal docker network DNS)
  54. API_BASE_URL=http://api:8081
  55. # OIDC (Entra ID) — lives in ui only
  56. OIDC_ENABLED=true
  57. OIDC_ISSUER=https://login.microsoftonline.com/<tenant>/v2.0
  58. OIDC_CLIENT_ID=
  59. OIDC_CLIENT_SECRET=
  60. OIDC_REDIRECT_URI=https://reputation.example.com/oidc/callback
  61. # Local admin — lives in ui only
  62. LOCAL_ADMIN_ENABLED=true
  63. LOCAL_ADMIN_USERNAME=admin
  64. # Generate with: php -r "echo password_hash('s3cret', PASSWORD_ARGON2ID);"
  65. LOCAL_ADMIN_PASSWORD_HASH=