Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
112 lines (101 loc) · 5.55 KB
/
Copy path.env.example
File metadata and controls
112 lines (101 loc) · 5.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# =============================================================================
# Enterprise RAG & Knowledge Intelligence Platform — environment template
# Copy to .env and replace every CHANGE_ME. Never commit .env.
# =============================================================================
# --- Deployment -------------------------------------------------------------------
ENVIRONMENT=prod # dev | test | prod (prod enforces secure settings at startup)
DOMAIN=rag.example.com # Caddy obtains a TLS certificate for this name
PUBLIC_APP_URL=https://rag.example.com # used in email links and the OAuth redirect URI
CORS_ORIGINS=https://rag.example.com
LOG_LEVEL=INFO
LOG_JSON=true
# --- Secrets (generate each one; see DEPLOYMENT.md) ----------------------------------
# python -c "import secrets; print(secrets.token_urlsafe(48))"
JWT_SECRET=CHANGE_ME
# python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
# Comma-separated; the FIRST key encrypts, all keys decrypt (append to rotate, then re-encrypt).
ENCRYPTION_KEYS=CHANGE_ME
COOKIE_SECURE=true
# --- PostgreSQL 16 + pgvector ------------------------------------------------------------
POSTGRES_SUPERUSER_PASSWORD=CHANGE_ME # used only by the init script and backups
APP_DB_USER=rag_app # non-superuser application role (Row-Level Security applies)
APP_DB_PASSWORD=CHANGE_ME
APP_DB_NAME=rag
# Outside docker compose, set DATABASE_URL directly:
# DATABASE_URL=postgresql+psycopg://rag_app:PASSWORD@db-host:5432/rag
DB_POOL_SIZE=10
DB_STATEMENT_TIMEOUT_MS=30000
# --- Object storage (S3 / MinIO) ---------------------------------------------------------
MINIO_ROOT_USER=CHANGE_ME
MINIO_ROOT_PASSWORD=CHANGE_ME
S3_BUCKET=rag-documents
# For AWS S3 instead of the bundled MinIO: STORAGE_BACKEND=s3, S3_ENDPOINT_URL= (empty), S3_REGION, keys.
MAX_UPLOAD_MB=100
MAX_BATCH_FILES=50
# --- Background jobs & events --------------------------------------------------------------
# JOB_BACKEND: external (separate worker service) | embedded (single process) | eager (tests)
JOB_MAX_ATTEMPTS=4
WORKER_CONCURRENCY=4
SCHEDULER_INTERVAL_SECONDS=30
# --- Email ------------------------------------------------------------------------------------
EMAIL_BACKEND=smtp # smtp | console (dev only, refused in prod)
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_FROM=no-reply@example.com
SMTP_STARTTLS=true
EMAIL_VERIFICATION_REQUIRED=false
# --- Security policy -----------------------------------------------------------------------------
PASSWORD_MIN_LENGTH=10
ACCESS_TOKEN_TTL_MINUTES=15
REFRESH_TOKEN_TTL_DAYS=14
LOGIN_RATE_LIMIT_PER_MINUTE=10
API_RATE_LIMIT_PER_MINUTE=600
# Database connections / AI endpoints on private networks (typical for self-hosted installs):
ALLOW_PRIVATE_NETWORK_TARGETS=true
# Website/sitemap/RSS ingestion and self-managed GitLab / Confluence site / IMAP hosts on private
# networks (keep false for multi-tenant SaaS; or allow-list specific hosts below):
ALLOW_PRIVATE_WEB_INGESTION=false
# Hosts that bypass the private-range rule (never cloud metadata), e.g. an internal Ollama:
SSRF_ALLOWLIST=
# Directories from which SQLite connections may be opened (read-only):
SQLITE_ALLOWED_DIRS=/data/sqlite
# --- AI defaults ---------------------------------------------------------------------------------------
# Organisations configure their own providers in Settings → AI providers. Without one, answers are
# extractive (quoted from sources). Platform-wide fallback (self-hosted only):
# Deployment-wide model for organisations that have not configured their own provider.
# DEFAULT_PROVIDER is tried first; DEFAULT_MODEL is used when it belongs to that provider,
# otherwise claude-sonnet-5-5 (Anthropic) or gpt-5.4-mini (OpenAI).
PLATFORM_LLM_FALLBACK=false
DEFAULT_PROVIDER=anthropic
DEFAULT_MODEL=claude-sonnet-5-5
ANTHROPIC_API_KEY=
# Organisation-level Anthropic keys also need a workspace id.
ANTHROPIC_WORKSPACE_ID=
OPENAI_API_KEY=
OLLAMA_BASE_URL=http://ollama:11434
LLM_TIMEOUT_SECONDS=120
# --- SaaS integrations: OAuth apps (optional) ------------------------------------------------------------------
# Register {PUBLIC_APP_URL}/api/v1/integrations/oauth/callback with each vendor (DEPLOYMENT.md §3, "OAuth apps").
# Unset vendors show "Needs setup" in Integrations; Notion, Confluence and Slack still work with tokens,
# GitLab and IMAP never need an app. Set these for both api and worker (the worker refreshes tokens).
OAUTH_GOOGLE_CLIENT_ID= # Google Drive
OAUTH_GOOGLE_CLIENT_SECRET=
OAUTH_MICROSOFT_CLIENT_ID= # OneDrive, SharePoint, Teams (Microsoft Graph)
OAUTH_MICROSOFT_CLIENT_SECRET=
OAUTH_MICROSOFT_TENANT=common # or your directory id / domain for a single-tenant app registration
OAUTH_DROPBOX_CLIENT_ID= # Dropbox "App key"
OAUTH_DROPBOX_CLIENT_SECRET= # Dropbox "App secret"
OAUTH_NOTION_CLIENT_ID= # Notion public integration
OAUTH_NOTION_CLIENT_SECRET=
OAUTH_ATLASSIAN_CLIENT_ID= # Confluence Cloud (Atlassian OAuth 2.0 3LO)
OAUTH_ATLASSIAN_CLIENT_SECRET=
OAUTH_SLACK_CLIENT_ID= # Slack app
OAUTH_SLACK_CLIENT_SECRET=
# --- Billing (optional) ------------------------------------------------------------------------------------
BILLING_ENABLED=false # false = every organisation gets the unlimited 'enterprise' plan
DEFAULT_PLAN=enterprise
# --- First platform administrator (created by the migrate service) -----------------------------------------
BOOTSTRAP_ADMIN_EMAIL=
BOOTSTRAP_ADMIN_PASSWORD=