forked from phronesis-io/eigenflux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
197 lines (167 loc) · 8.16 KB
/
.env.example
File metadata and controls
197 lines (167 loc) · 8.16 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
192
193
194
195
196
197
# ============================================================
# Core Infrastructure
# ============================================================
# PostgreSQL connection string
# Format: postgres://user:password@host:port/database?sslmode=disable
PG_DSN=postgres://eigenflux:eigenflux123@localhost:5432/eigenflux?sslmode=disable
# Redis connection
REDIS_ADDR=localhost:6379
REDIS_PASSWORD=
# etcd connection for service discovery and distributed coordination
ETCD_ADDR=localhost:2379
# Elasticsearch connection
# ES_URL: Full URL including protocol (http:// or https://)
ES_URL=http://localhost:9200
ES_USERNAME=
ES_PASSWORD=
# Elasticsearch index configuration
# ES_SHARDS: Number of primary shards per index (default: 1, increase for larger datasets)
# ES_REPLICAS: Number of replica shards (default: 0 for single-node, 1+ for multi-node clusters)
ES_SHARDS=1
ES_REPLICAS=0
# ============================================================
# Application Environment
# ============================================================
# Runtime environment: dev | test | staging | prod
# Affects logging, error handling, and feature flags
APP_ENV=dev
# Lowercase project slug / namespace.
# Used as the Docker Compose project name and the local agent storage namespace,
# for example ~/.openclaw/${PROJECT_NAME}/credentials.json.
# default 'myhub'
PROJECT_NAME=
# Human-readable project title shown in /skill.md. Supports uppercase/lowercase.
# default 'MyHub'
PROJECT_TITLE=
# Public root URL used to render /skill.md metadata.api_base.
# If empty, the API service auto-generates a fallback such as 'http://192.168.1.10:8080'.
PUBLIC_BASE_URL=
# ============================================================
# Service Ports
# ============================================================
# HTTP services
API_PORT=8080 # API Gateway (Hertz)
CONSOLE_API_PORT=8090 # Console API (Hertz)
CONSOLE_WEBAPP_PORT=5173 # Console frontend (Vite dev server)
# Console API URL for frontend (used by console/webapp)
# In production, set to your actual console API domain
CONSOLE_API_URL=http://localhost:8090/console/api/v1
# RPC services (Kitex)
PROFILE_RPC_PORT=8881 # Profile service
ITEM_RPC_PORT=8882 # Item service
SORT_RPC_PORT=8883 # Sort service
FEED_RPC_PORT=8884 # Feed service
AUTH_RPC_PORT=8886 # Auth service
PUSH_RPC_PORT=8887 # Push service
# Docker exposed ports (for running multiple projects in parallel)
# Change these if you have port conflicts with other projects
POSTGRES_PORT=5432
REDIS_PORT=6379
ETCD_PORT=2379
ELASTICSEARCH_HTTP_PORT=9200
ELASTICSEARCH_TRANSPORT_PORT=9300
KIBANA_PORT=5601
# ============================================================
# LLM Configuration
# ============================================================
# OpenAI-compatible API for content processing
# Supports OpenAI, Azure OpenAI, or any OpenAI-compatible endpoint
LLM_API_KEY=your-openai-api-key-here
LLM_BASE_URL=https://api.openai.com/v1
# Recommended models: gpt-5.4-nano (cost-effective), gpt-5.4 (higher quality)
LLM_MODEL=gpt-5.4-nano
# ============================================================
# Embedding Configuration
# ============================================================
# Provider: "openai" or "ollama"
# OpenAI: Requires EMBEDDING_API_KEY, uses cloud API
# Ollama: Requires an externally managed Ollama service
EMBEDDING_PROVIDER=openai
# OpenAI embedding settings (when EMBEDDING_PROVIDER=openai)
# EMBEDDING_API_KEY: Your OpenAI API key
# EMBEDDING_MODEL: text-embedding-3-small (1536 dims) or text-embedding-3-large (3072 dims)
# EMBEDDING_DIMENSIONS: Must match model output (1536 for text-embedding-3-small)
EMBEDDING_BASE_URL=https://api.openai.com/v1
EMBEDDING_API_KEY=your-openai-api-key-here
EMBEDDING_MODEL=text-embedding-3-small
EMBEDDING_DIMENSIONS=1536
# Ollama embedding settings (when EMBEDDING_PROVIDER=ollama)
# EMBEDDING_BASE_URL: Ollama API endpoint
# EMBEDDING_MODEL: nomic-embed-text (768 dims, default) or other Ollama embedding models
# EMBEDDING_DIMENSIONS: Must match model output (768 for nomic-embed-text)
# IMPORTANT: After changing embedding provider or dimensions, you must:
# 1. Delete existing Elasticsearch items-* indices
# 2. Restart services to recreate indices with correct dimensions
# 3. Re-publish content to regenerate embeddings
# ============================================================
# Email / Authentication
# ============================================================
# Enable OTP email verification. Default false for easier self-hosted deployment.
# When false, POST /api/v1/auth/login returns access_token directly and no email is sent.
ENABLE_EMAIL_VERIFICATION=false
# Resend API for sending OTP emails (required only when ENABLE_EMAIL_VERIFICATION=true)
# Get your API key from https://resend.com/api-keys
RESEND_API_KEY=your-resend-api-key-here
# Sender email address (must be verified in Resend, only used when ENABLE_EMAIL_VERIFICATION=true)
RESEND_FROM_EMAIL="EigenFlux <noreply@yourdomain.com>"
# Mock OTP for testing (whitelist-based bypass)
# When both email suffix AND IP match, use MOCK_UNIVERSAL_OTP instead of sending real email
# Suitable for backend operation accounts in production
# Both conditions must be satisfied simultaneously
MOCK_OTP_EMAIL_SUFFIXES=@test.com
MOCK_OTP_IP_WHITELIST=127.0.0.1,::1,[::1]
# Universal OTP code for whitelist-matched requests (can include letters and numbers)
MOCK_UNIVERSAL_OTP=123456
# ============================================================
# Cache Configuration
# ============================================================
# Enable search result caching (default: true)
# Reduces Elasticsearch load under high-frequency polling
ENABLE_SEARCH_CACHE=true
# Cache TTL settings (in seconds)
SEARCH_CACHE_TTL=2 # Search result cache (default: 2s)
PROFILE_CACHE_TTL=60 # User profile cache (default: 60s)
MILESTONE_RULE_CACHE_TTL=60 # Milestone rule cache (default: 60s)
# ============================================================
# Feed & Content Configuration
# ============================================================
# Disable deduplication in dev/test environments (default: false)
# When true, allows pulling already-seen content in feed
# Forced to false in production (APP_ENV=prod)
DISABLE_DEDUP_IN_TEST=false
# Quality score threshold for filtering items (default: 0.0, range: 0.0-1.0)
# Items with quality_score below this threshold are excluded from feed
# Set to 0.0 to disable quality filtering
QUALITY_THRESHOLD=0.0
# ============================================================
# Async Pipeline Workers
# ============================================================
# Number of concurrent workers for item consumer (default: 10)
# Processes published items: LLM enrichment, embedding generation, ES indexing
ITEM_CONSUMER_WORKERS=10
# Number of concurrent workers for feedback consumer (default: 5)
# Processes feedback scores and updates item statistics
FEEDBACK_CONSUMER_WORKERS=5
# ============================================================
# ID Generation (Snowflake)
# ============================================================
# etcd prefix for snowflake worker_id allocation (default: /eigenflux/idgen/workers)
ID_WORKER_PREFIX=/eigenflux/idgen/workers
# Snowflake custom epoch in milliseconds (default: 1704067200000 = 2024-01-01 00:00:00 UTC)
# Once set in production, DO NOT change (will cause ID conflicts)
ID_SNOWFLAKE_EPOCH_MS=1704067200000
# etcd lease TTL for worker_id in seconds (default: 30)
# Worker renews lease periodically; if lease expires, worker_id is released
ID_WORKER_LEASE_TTL=30
# Optional stable instance identifier for worker registration
# If not set, auto-generated as hostname-pid-timestamp
# Use stable ID in production for better worker_id reuse
ID_INSTANCE_ID=
# ============================================================
# Console CORS Configuration
# ============================================================
# Allowed origins for Console API CORS (comma-separated)
# Default: "*" (allow all) when empty
# In production, set to your frontend domain(s)
# Example: https://console.yourdomain.com,https://admin.yourdomain.com
CONSOLE_CORS_ALLOW_ORIGINS=http://localhost:5173