-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy path.env.example
More file actions
216 lines (179 loc) · 9.03 KB
/
.env.example
File metadata and controls
216 lines (179 loc) · 9.03 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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#####################################################################################
# 🚀 RHESIS APPLICATION CONFIGURATION
#####################################################################################
# This filee contains all environment variables needed to run the Rhesis application.
# Copy this file to .env and fill in your actual values.
#
# 📋 CONFIGURATION CATEGORIES:
# 1. 🔧 USER-DEFINED (Required) - You MUST set these values
# 2. ⚙️ OPTIONAL (Recommended) - Set these for enhanced functionality
# 3. 🏗️ RHESIS-DEFINED (Don't change) - Internal configuration
#
# 💡 TIP: Start with USER-DEFINED variables, then add OPTIONAL ones as needed.
#####################################################################################
#####################################################################################
# 🔧 USER-DEFINED CONFIGURATION (REQUIRED)
# These variables MUST be set for the application to run properly
#####################################################################################
# =============================================================================
# 🔐 AUTHENTICATION & AUTHORIZATION
# =============================================================================
# Auth0 Configuration - Get these from https://manage.auth0.com/
# Create an Auth0 application and API to get these values
AUTH0_DOMAIN=your-tenant.auth0.com
AUTH0_AUDIENCE=https://api.yourdomain.com
AUTH0_CLIENT_ID=your-auth0-client-id
AUTH0_CLIENT_SECRET=your-auth0-client-secret
AUTH0_SECRET_KEY=your-jwt-secret-key
# JWT Configuration
JWT_SECRET_KEY=your-jwt-secret-key
# NextAuth Configuration
NEXTAUTH_SECRET=your-nextauth-secret
# Frontend Auth0 Configuration (public)
NEXT_PUBLIC_AUTH0_CLIENT_ID=your-auth0-client-id
NEXT_PUBLIC_AUTH0_DOMAIN=your-tenant.auth0.com
# =============================================================================
# 🌐 GOOGLE AUTHENTICATION
# =============================================================================
# Google OAuth (for Google sign-in)
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
# =============================================================================
# 🗄️ Database Encryption Key.
# =============================================================================
# Database Encryption Key (REQUIRED for database field encryption)
# Generate a new key using: uv run --with cryptography python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
DB_ENCRYPTION_KEY=BASE64_ENCODED_DB_ENCRYPTION_KEY
#####################################################################################
# ⚙️ OPTIONAL CONFIGURATION (RECOMMENDED)
# These variables enhance functionality but are not required for basic operation
#####################################################################################
# =============================================================================
# 🤖 AI MODEL CONFIGURATION
# =============================================================================
# Choose one or more AI providers based on your needs
# Default models (format: provider/model_name)
DEFAULT_GENERATION_MODEL=rhesis/rhesis-default
DEFAULT_EVALUATION_MODEL=rhesis/rhesis-default
DEFAULT_EMBEDDING_MODEL=vertex_ai/text-embedding-005
# Azure OpenAI (if using Azure)
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_API_KEY=your-azure-openai-api-key
AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o
AZURE_OPENAI_API_VERSION=2024-02-15-preview
# OpenAI (if using OpenAI directly)
OPENAI_API_KEY=your-openai-api-key
OPENAI_MODEL_NAME=gpt-4o
# Google Gemini (if using Google AI)
GEMINI_API_KEY=your-gemini-api-key
GOOGLE_API_KEY=your-google-api-key
GEMINI_MODEL_NAME=gemini-2.0-flash-001
# =============================================================================
# 📧 EMAIL CONFIGURATION
# =============================================================================
# SMTP settings for email notifications (optional)
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=465
SMTP_USER=your-smtp-username
SMTP_PASSWORD=your-smtp-password
FROM_EMAIL=noreply@yourdomain.com
# SendGrid API Key (for Dynamic Templates and scheduling)
SENDGRID_API_KEY=your-sendgrid-api-key
# SendGrid Dynamic Template IDs (optional)
SENDGRID_DAY_1_EMAIL_TEMPLATE_ID=your-sendgrid-template-id
SENDGRID_DAY_2_EMAIL_TEMPLATE_ID=your-sendgrid-template-id
SENDGRID_DAY_3_EMAIL_TEMPLATE_ID=your-sendgrid-template-id
# =============================================================================
# 🔗 EXTERNAL SERVICES
# =============================================================================
# Worker API URL (if using external worker service)
WORKER_API_URL=http://localhost:8081
# Rhesis API Key (if using external Rhesis services)
RHESIS_API_KEY=your-rhesis-api-key
#####################################################################################
# 🏗️ RHESIS-DEFINED CONFIGURATION (DON'T CHANGE)
# These are internal application settings - modify only if you know what you're doing
# Only change the "your-secured-password" with strong passwords for Database and Redis
# Must change the Database and Redis Configuration for the Production deployment
#####################################################################################
# =============================================================================
# 🗄️ DATABASE INTERNAL CONFIGURATION
# =============================================================================
# SQLAlchemy Database Configuration
SQLALCHEMY_DB_DRIVER=postgresql
SQLALCHEMY_DB_USER=rhesis-user
SQLALCHEMY_DB_PASS=your-secured-password
SQLALCHEMY_DB_HOST=postgres
SQLALCHEMY_DB_NAME=rhesis-db
# postgres is the db container name in this url
SQLALCHEMY_DATABASE_URL=postgresql://rhesis-user:your-secured-password@postgres:5432/rhesis-db
# =============================================================================
# 🔴 REDIS INTERNAL CONFIGURATION
# =============================================================================
# Redis URLs
REDIS_PORT=6379
REDIS_PASSWORD=your-secured-password
REDIS_URL=redis://:your-secured-password@redis:6379/0
BROKER_URL=redis://:your-secured-password@redis:6379/0
CELERY_RESULT_BACKEND=redis://:your-secured-password@redis:6379/1
# =============================================================================
# 🌐 SERVICE CONFIGURATION
# =============================================================================
# Service Ports
BACKEND_PORT=8080
FRONTEND_PORT=3000
# Environment Settings
ENVIRONMENT=local
FRONTEND_ENV=local
BACKEND_ENV=local
WORKER_ENV=local
LOG_LEVEL=INFO
# =============================================================================
# 🔗 INTERNAL URLS
# =============================================================================
# Application URLs
RHESIS_BASE_URL=http://localhost:8080
FRONTEND_URL=http://localhost:3000
BACKEND_URL=http://backend:8080
NEXT_PUBLIC_API_BASE_URL=http://localhost:8080
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXTAUTH_URL=http://localhost:3000
# =============================================================================
# 📊 JWT INTERNAL CONFIGURATION
# =============================================================================
# JWT Settings
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=1440
# =============================================================================
# 🏠 LOCAL DEVELOPMENT
# =============================================================================
# For local development (outside Docker)
DATABASE_URL=postgresql://rhesis-user:your-secured-password@localhost:5432/rhesis-db
# Development paths (adjust as needed)
RHESIS_BASE_PATH=/path/to/your/rhesis/project/
LOCAL_STORAGE_PATH=/tmp/rhesis-files # fallback for local development
# Optional: set these if you want to access GCS locally
# STORAGE_SERVICE_URI=gs://sources-rhesis-dev
# STORAGE_SERVICE_ACCOUNT_KEY='your-base64-service-account-key'
# OpenTelemetry Configuration (Optional)
# Used for collecting telemetry data (traces, metrics) for monitoring
# OTel Collector endpoint (where telemetry data is sent)
OTEL_EXPORTER_OTLP_ENDPOINT=https://telemetry.rhesis.ai
OTEL_SERVICE_NAME=rhesis-backend
OTEL_DEPLOYMENT_TYPE=self-hosted
# Enable/disable telemetry collection
# Self-hosted: opt-in (set to true to enable)
OTEL_RHESIS_TELEMETRY_ENABLED=true
# SDK Connector configuration (Optional)
RHESIS_CONNECTOR_DISABLED=true
# Project ID for SDK connector (if RHESIS_CONNECTOR_DISABLED is set to false)
RHESIS_PROJECT_ID=your-project-id
#####################################################################################
# 📚 QUICK START GUIDE
#####################################################################################
# 1. Copy this file: cp .env.example .env.docker
# 2. Set required USER-DEFINED variables (minimum for basic operation):
# 3. Optionally set OPTIONAL variables for enhanced functionality
# 4. Change the "your-secured-password" with strong secured passwords for Database and Redis
# 5. Run the application: docker compose --env-file .env.docker up
#####################################################################################