-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy path.env.local.example
More file actions
191 lines (164 loc) · 8.59 KB
/
.env.local.example
File metadata and controls
191 lines (164 loc) · 8.59 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
###############################################################################
# Morphic Configuration
###############################################################################
# =============================================================================
# REQUIRED CONFIGURATION
# These settings are essential for the application to function
# =============================================================================
# -----------------------------------------------------------------------------
# Database Configuration (Required)
# -----------------------------------------------------------------------------
# PostgreSQL connection string (supports Neon, Supabase, or standard PostgreSQL)
# Format: postgresql://[user]:[password]@[host]/[database]?sslmode=require
#
# For local development: Use your local PostgreSQL instance
# DATABASE_URL=postgresql://user:password@localhost:5432/morphic
#
# For Docker: Use the postgres service name from docker-compose.yaml
# DATABASE_URL=postgresql://morphic:morphic@postgres:5432/morphic
#
# For cloud providers (Neon, Supabase, etc.): Add ?sslmode=require
# DATABASE_URL=postgresql://user:password@host/database?sslmode=require
DATABASE_URL=[YOUR_DATABASE_URL]
# -----------------------------------------------------------------------------
# AI Provider Configuration (At least one required)
# -----------------------------------------------------------------------------
# IMPORTANT: When using non-OpenAI providers, you must update the model
# configuration in config/models/*.json to use compatible model IDs for your
# chosen provider. See docs/CONFIGURATION.md for provider-specific model IDs.
# Option 1: OpenAI
# Get your API key at: https://platform.openai.com/api-keys
OPENAI_API_KEY=[YOUR_OPENAI_API_KEY]
# Option 2: Anthropic Claude
# Requires updating config/models/*.json with Anthropic model IDs
# ANTHROPIC_API_KEY=[YOUR_ANTHROPIC_API_KEY]
# Option 3: Google Gemini
# Requires updating config/models/*.json with Google model IDs
# GOOGLE_GENERATIVE_AI_API_KEY=[YOUR_GOOGLE_GENERATIVE_AI_API_KEY]
# Option 4: Vercel AI Gateway
# Unified API gateway for multiple providers
# AI_GATEWAY_API_KEY=[YOUR_AI_GATEWAY_API_KEY]
# Option 5: Ollama
# Run local AI models with Ollama
# Requires Ollama to be installed and running: https://ollama.com/
# Models must support 'tools' capability to work with Morphic
# OLLAMA_BASE_URL=http://localhost:11434
# -----------------------------------------------------------------------------
# Primary Search Provider Configuration (Required - Choose One)
# -----------------------------------------------------------------------------
# Option 1: Tavily Search (Default)
# Get your API key at: https://app.tavily.com/home
TAVILY_API_KEY=[YOUR_TAVILY_API_KEY]
# Option 2: Exa Neural Search (Alternative to Tavily)
# Get your API key at: https://dashboard.exa.ai/
# Note: API key should be without quotes
# EXA_API_KEY=your_api_key_without_quotes
# Option 3: Firecrawl (Alternative web scraping and content extraction)
# Get your API key at: https://www.firecrawl.dev/app
# FIRECRAWL_API_KEY=[YOUR_FIRECRAWL_API_KEY]
# -----------------------------------------------------------------------------
# Additional Search Provider Configuration
# -----------------------------------------------------------------------------
# Brave Search (Optional - used for type="general" searches with video/image support)
# Get your API key at: https://brave.com/search/api/
# If not configured, general searches will fall back to the configured optimized search provider
# BRAVE_SEARCH_API_KEY=[YOUR_BRAVE_SEARCH_API_KEY]
# =============================================================================
# OPTIONAL FEATURES
# Enable additional functionality as needed
# =============================================================================
# -----------------------------------------------------------------------------
# Authentication Configuration (Optional)
# -----------------------------------------------------------------------------
# By default, authentication is disabled for personal use (ENABLE_AUTH=false)
# All users share the same anonymous user ID
# ⚠️ For personal, single-user environments only
# Default: Authentication disabled (anonymous mode)
ENABLE_AUTH=false
ANONYMOUS_USER_ID=anonymous-user
# To enable Supabase authentication, set ENABLE_AUTH=true and configure:
# Get your project URL and anon key from: https://supabase.com/dashboard
# ENABLE_AUTH=true
# NEXT_PUBLIC_SUPABASE_URL=[YOUR_SUPABASE_PROJECT_URL]
# NEXT_PUBLIC_SUPABASE_ANON_KEY=[YOUR_SUPABASE_ANON_KEY]
# =============================================================================
# -----------------------------------------------------------------------------
# Cloud Deployment Configuration
# -----------------------------------------------------------------------------
# Enable rate limiting and analytics for cloud deployments
# When enabled:
# - Quality mode chat requests are limited to 5 per day
# - Analytics events are tracked to Vercel Analytics (search mode, model type,
# conversation turns, etc.)
# Requires UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN for rate limiting
# MORPHIC_CLOUD_DEPLOYMENT=true
# -----------------------------------------------------------------------------
# File Upload Support (Cloudflare R2)
# Enable file and image upload functionality
# -----------------------------------------------------------------------------
# R2_ACCOUNT_ID=[YOUR_R2_ACCOUNT_ID]
# R2_ACCESS_KEY_ID=[YOUR_R2_ACCESS_KEY_ID]
# R2_SECRET_ACCESS_KEY=[YOUR_R2_SECRET_ACCESS_KEY]
# R2_BUCKET_NAME=user-uploads # Default: user-uploads
# R2_PUBLIC_URL=[YOUR_R2_PUBLIC_URL] # e.g., https://pub-xxx.r2.dev
# -----------------------------------------------------------------------------
# Alternative Search Providers
# Configure different search backends
# -----------------------------------------------------------------------------
# Select search provider (default: tavily)
# SEARCH_API=tavily # Options: tavily, searxng, exa, firecrawl
# SearXNG (Self-hosted)
# SEARXNG_API_URL=http://localhost:8080 # Or docker: http://searxng:8080
# SEARXNG_SECRET=[YOUR_SECRET_KEY] # Generate: openssl rand -base64 32
# SEARXNG_PORT=8080
# SEARXNG_BIND_ADDRESS=0.0.0.0
# SEARXNG_IMAGE_PROXY=true
# SEARXNG_LIMITER=false
# SEARXNG_DEFAULT_DEPTH=basic # Options: basic, advanced
# SEARXNG_MAX_RESULTS=50
# SEARXNG_ENGINES=google,bing,duckduckgo,wikipedia
# SEARXNG_TIME_RANGE=None # Options: day, week, month, year, None
# SEARXNG_SAFESEARCH=0 # 0=off, 1=moderate, 2=strict
# -----------------------------------------------------------------------------
# Content Extraction
# -----------------------------------------------------------------------------
# Default: Tavily Extract API (uses TAVILY_API_KEY configured above)
#
# Alternative: Jina AI - Enhanced content extraction from web pages
# Provides alternative extraction method with different capabilities
# Get your API key at: https://jina.ai/
# JINA_API_KEY=[YOUR_JINA_API_KEY]
# -----------------------------------------------------------------------------
# Observability & Monitoring
# -----------------------------------------------------------------------------
# Langfuse Tracing
# ENABLE_LANGFUSE_TRACING=true
# LANGFUSE_SECRET_KEY=[YOUR_LANGFUSE_SECRET_KEY]
# LANGFUSE_PUBLIC_KEY=[YOUR_LANGFUSE_PUBLIC_KEY]
# LANGFUSE_BASEURL=https://cloud.langfuse.com # Or self-hosted URL
# Performance Logging
# ENABLE_PERF_LOGGING=true
# -----------------------------------------------------------------------------
# Docker Configuration (Optional)
# -----------------------------------------------------------------------------
# PostgreSQL credentials for Docker Compose
# These are only used when running with docker-compose.yaml
# POSTGRES_USER=morphic # Default: morphic
# POSTGRES_PASSWORD=morphic # Default: morphic
# POSTGRES_DB=morphic # Default: morphic
# POSTGRES_PORT=5432 # Default: 5432
# Redis Configuration (Optional)
# Local Redis is used by default for SearXNG advanced search caching
# Only set this if you need a custom Redis URL
# Default: redis://localhost:6379 (automatically used in Docker)
# LOCAL_REDIS_URL=redis://localhost:6379
# Database SSL Configuration (Optional)
# Set to true to disable SSL certificate verification
# Automatically set to true in docker-compose.yaml for local PostgreSQL
# IMPORTANT: Do NOT set this for cloud databases (Neon, Supabase, etc.)
# DATABASE_SSL_DISABLED=true
# -----------------------------------------------------------------------------
# Advanced Configuration
# -----------------------------------------------------------------------------
# Feedback Notifications (Slack)
# SLACK_WEBHOOK_URL=[YOUR_SLACK_WEBHOOK_URL]