.env.example 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # ─────────────────────────────────────────────────────────────────────────────
  2. # EKS Support Relay — environment template.
  3. # Copy to .env, fill in real values, and keep the file at chmod 0600.
  4. # NEVER commit a filled-in .env.
  5. # ─────────────────────────────────────────────────────────────────────────────
  6. # --- Runtime ---------------------------------------------------------------
  7. NODE_ENV=production
  8. PORT=3000
  9. # prod = compiled build (deterministic); dev = tsx watch (no restart on edits)
  10. RELAY_MODE=prod
  11. # Absolute path inside the container. Prisma resolves relative file: URLs
  12. # against prisma/, which is a common source of "wrong database" confusion.
  13. DATABASE_URL=file:/app/data/eks_relay.db
  14. # --- Chatwoot --------------------------------------------------------------
  15. CHATWOOT_BASE_URL=https://eksupport.easyklima.com
  16. CHATWOOT_API_TOKEN=
  17. CHATWOOT_ACCOUNT_ID=1
  18. CHATWOOT_TICKET_LABEL=ticket
  19. CHATWOOT_SPAM_LABEL=spam
  20. # Only enable once the `spam` label actually exists in the Chatwoot account.
  21. CHATWOOT_APPLY_SPAM_LABEL=false
  22. # Unassign the bot agent when a ticket is created.
  23. CHATWOOT_UNASSIGN_ON_TICKET=true
  24. CHATWOOT_OPEN_ON_TICKET=true
  25. # When true, EKSRelay only answers if Chatwoot reports the conversation as
  26. # assigned to a real AgentBot (assignee_agent_bot_id/meta.assignee_type), not the
  27. # legacy technical user account used for API calls.
  28. CHATWOOT_REQUIRE_AGENT_BOT_ASSIGNMENT=false
  29. CHATWOOT_REQUIRED_AGENT_BOT_ID=
  30. # Webchat / API inbox — reserved for the later web widget adapter.
  31. CHATWOOT_API_INBOX_ID=
  32. CHATWOOT_API_IDENTITY_VALIDATION_TOKEN=
  33. # --- Flowise ---------------------------------------------------------------
  34. FLOWISE_PREDICT_URL=https://botek.easyklima.com/api/v1/prediction/09fc9332-8cdd-4142-8f0e-4259881fc7bf
  35. # Optional separate Flowise chatflow for agent UI translations. Falls back to
  36. # FLOWISE_PREDICT_URL when empty, but production should point this at the small
  37. # translation-only flow.
  38. FLOWISE_TRANSLATION_PREDICT_URL=
  39. FLOWISE_API_KEY=
  40. # Optional; derived from FLOWISE_PREDICT_URL when empty. Used by /ready only.
  41. FLOWISE_BASE_URL=
  42. FLOWISE_TIMEOUT_MS=90000
  43. # Optional read-only KB sidecar/API used by /ops. Leave empty until deployed.
  44. KB_API_BASE_URL=
  45. KB_API_TOKEN=
  46. # --- WooCommerce / WordPress ----------------------------------------------
  47. WOOCOMMERCE_BASE_URL=https://easyklima.com
  48. WOOCOMMERCE_CONSUMER_KEY=
  49. WOOCOMMERCE_CONSUMER_SECRET=
  50. # Bearer token for the eksrelay/v1 mu-plugin. Leave empty until the plugin
  51. # enforces it (see docs/DEPLOY.md).
  52. WP_STORE_API_SECRET=
  53. # Currencies actually configured in the shop's multicurrency plugin.
  54. STORE_CURRENCIES=PLN,EUR,AED,CZK,HUF,DKK,SEK,NOK,RON,BGN,GBP
  55. # --- Relay auth ------------------------------------------------------------
  56. # Shared with the Flowise custom tools as $vars.relay_shared_secret.
  57. RELAY_SHARED_SECRET=
  58. # Guards /admin/*. Empty means the admin endpoints are closed, not open.
  59. ADMIN_TOKEN=
  60. # Guards /agent-tools/* browser helper endpoints used by the Chatwoot AI overlay.
  61. # Use a separate operator/UI token, not ADMIN_TOKEN.
  62. AGENT_UI_TOKEN=
  63. # Comma-separated extra browser origins allowed to call /agent-tools/*.
  64. # CHATWOOT_BASE_URL is allowed automatically.
  65. AGENT_UI_ALLOWED_ORIGINS=
  66. # --- Behaviour -------------------------------------------------------------
  67. TENANT_ID=easyklima
  68. DEFAULT_LANGUAGE=pl
  69. TICKET_NUMBER_PREFIX=EKS
  70. WORKER_ENABLED=true
  71. WORKER_POLL_MS=1000
  72. WORKER_MAX_ATTEMPTS=3
  73. SPAM_GATE_ENABLED=true
  74. HTTP_TIMEOUT_MS=30000
  75. # --- Logging ---------------------------------------------------------------
  76. LOG_LEVEL=info
  77. # Switch on ONLY while debugging; it lets customer e-mails and message bodies
  78. # reach the logs. Secrets stay redacted either way.
  79. LOG_PII=false