-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
302 lines (230 loc) · 8.97 KB
/
.env.example
File metadata and controls
302 lines (230 loc) · 8.97 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# Rendiff Probe Configuration
# Powered by FFprobe (FFmpeg)
# Copy this file to .env and configure for your environment
# =============================================================================
# BASIC CONFIGURATION
# =============================================================================
# Environment (development, staging, production)
GO_ENV=development
# API Server
API_PORT=8080
HOST=0.0.0.0
# =============================================================================
# AUTHENTICATION (Required)
# =============================================================================
# Enable/disable authentication
ENABLE_AUTH=true
# API Key Authentication (Recommended)
# Generate with: openssl rand -hex 32
# Format: rendiff_[env]_sk_[64-hex-chars]
API_KEY=rendiff_test_sk_0123456789abcdef0123456789abcdef01234567890abcdef0123456789abcdef
# JWT Authentication (Optional)
# Generate with: openssl rand -hex 32
JWT_SECRET=your-jwt-secret-key-minimum-32-characters-long-for-security
# Token expiration (hours)
TOKEN_EXPIRY=24
REFRESH_EXPIRY=168
# =============================================================================
# RATE LIMITING CONFIGURATION
# =============================================================================
# Rate limits per user
RATE_LIMIT_PER_MINUTE=60
RATE_LIMIT_PER_HOUR=1000
RATE_LIMIT_PER_DAY=10000
# =============================================================================
# DATABASE CONFIGURATION
# =============================================================================
# Database type: sqlite or postgres
DB_TYPE=sqlite
# SQLite database path (embedded, zero-config)
DB_PATH=/app/data/rendiff-probe.db
# PostgreSQL settings (optional, when DB_TYPE=postgres)
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=rendiff_probe
POSTGRES_USER=rendiff
POSTGRES_PASSWORD=change_this_secure_database_password
# Database connection pool
DB_MAX_OPEN_CONNS=25
DB_MAX_IDLE_CONNS=10
# =============================================================================
# VALKEY CONFIGURATION (Redis-compatible cache)
# =============================================================================
# Valkey settings (Redis-compatible open source alternative)
VALKEY_HOST=valkey
VALKEY_PORT=6379
VALKEY_PASSWORD=change_this_secure_valkey_password
VALKEY_DB=0
# =============================================================================
# FILE STORAGE CONFIGURATION
# =============================================================================
# Local storage paths
DATA_PATH=./data
UPLOAD_DIR=/app/uploads
REPORTS_DIR=/app/reports
TEMP_DIR=/app/temp
CACHE_DIR=/app/cache
BACKUP_DIR=/app/backup
# File upload limits
MAX_FILE_SIZE=53687091200 # 50GB in bytes
MAX_CONCURRENT_JOBS=4
# =============================================================================
# FFMPEG CONFIGURATION
# =============================================================================
# FFmpeg binary paths (usually set by Docker container)
FFMPEG_PATH=/usr/local/bin/ffmpeg
FFPROBE_PATH=/usr/local/bin/ffprobe
VMAF_MODEL_PATH=/usr/local/share/vmaf
# Processing limits
PROCESSING_TIMEOUT=300
WORKER_POOL_SIZE=16
# =============================================================================
# MONITORING CONFIGURATION
# =============================================================================
# Grafana settings
GRAFANA_USER=admin
GRAFANA_PASSWORD=change_this_grafana_password
# Enable monitoring services
ENABLE_PROMETHEUS=true
ENABLE_GRAFANA=true
# =============================================================================
# CLOUD STORAGE CONFIGURATION (OPTIONAL)
# =============================================================================
# Storage provider: local, s3, gcs, azure
STORAGE_TYPE=local
# AWS S3 Configuration (if STORAGE_TYPE=s3)
# AWS_ACCESS_KEY_ID=your_aws_access_key
# AWS_SECRET_ACCESS_KEY=your_aws_secret_key
# S3_BUCKET=your-ffprobe-bucket
# AWS_REGION=us-east-1
# Google Cloud Storage Configuration (if STORAGE_TYPE=gcs)
# GCS_BUCKET=your-ffprobe-bucket
# GCP_PROJECT_ID=your-project-id
# GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
# Azure Blob Storage Configuration (if STORAGE_TYPE=azure)
# AZURE_STORAGE_ACCOUNT=your_storage_account
# AZURE_STORAGE_KEY=your_storage_key
# AZURE_CONTAINER=your-container
# =============================================================================
# BACKUP CONFIGURATION (OPTIONAL)
# =============================================================================
# Enable automatic backups
ENABLE_BACKUPS=false
# Backup settings
BACKUP_RETENTION_DAYS=30
BACKUP_SCHEDULE="0 2 * * *" # Daily at 2 AM
# =============================================================================
# SSL/TLS CONFIGURATION (PRODUCTION)
# =============================================================================
# SSL type: letsencrypt, custom, disabled
SSL_TYPE=disabled
# Custom SSL certificate paths (if SSL_TYPE=custom)
# SSL_CERT_PATH=/path/to/certificate.crt
# SSL_KEY_PATH=/path/to/private.key
# =============================================================================
# CORS CONFIGURATION
# =============================================================================
# Allowed origins (comma-separated)
ALLOWED_ORIGINS=*
# Trusted proxy networks
TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
# =============================================================================
# PERFORMANCE TUNING
# =============================================================================
# Memory limits and optimization
UPLOAD_MEMORY_LIMIT=8GB
PROCESSING_MEMORY_LIMIT=16GB
# Cache settings
CACHE_TTL=3600
CACHE_NAMESPACE=rendiff:
CACHE_COMPRESSION=true
# Memory cache
MEMORY_CACHE_SIZE=1GB
MEMORY_CACHE_TTL=300
# =============================================================================
# LOGGING CONFIGURATION
# =============================================================================
# Log format: json, text
LOG_FORMAT=json
# Log output: stdout, file
LOG_OUTPUT=stdout
# Log rotation (if LOG_OUTPUT=file)
LOG_ROTATION=true
LOG_MAX_SIZE=100MB
LOG_MAX_AGE=30
LOG_MAX_BACKUPS=10
# Request logging
LOG_REQUESTS=true
LOG_REQUEST_BODY=false
LOG_RESPONSE_BODY=false
# =============================================================================
# DEVELOPMENT SETTINGS
# =============================================================================
# Development mode overrides (only applied in development)
DEV_ENABLE_DEBUG=true
DEV_DISABLE_AUTH=true
DEV_DISABLE_RATE_LIMIT=true
DEV_VERBOSE_LOGGING=true
# =============================================================================
# TESTING CONFIGURATION
# =============================================================================
# Test database (for running tests)
TEST_DB_TYPE=sqlite
TEST_DB_PATH=/tmp/rendiff_test.db
TEST_VALKEY_HOST=localhost
TEST_VALKEY_PORT=6380
# =============================================================================
# LOCAL AI/LLM CONFIGURATION
# =============================================================================
# Enable local LLM processing via Ollama
ENABLE_LOCAL_LLM=true
# Ollama service URL
OLLAMA_URL=http://ollama:11434
# Ollama model to use for analysis
# Primary model: gemma3:270m (ultra-fast, 270M params, ~200MB RAM) - SET AS PRIMARY
# Fallback model: phi3:mini (better reasoning, 3.8B params, 2GB RAM)
OLLAMA_MODEL=gemma3:270m
OLLAMA_FALLBACK_MODEL=phi3:mini
# Path for storing Ollama models
OLLAMA_MODELS_PATH=/root/.ollama/models
# OpenRouter API key (fallback for cloud LLM)
# Get from: https://openrouter.ai/keys
# OPENROUTER_API_KEY=your_openrouter_api_key_here
# =============================================================================
# ADVANCED FEATURES
# =============================================================================
# AI/ML features (experimental)
ENABLE_AI_FEATURES=false
# WebSocket support
ENABLE_WEBSOCKETS=false
# Metrics collection
ENABLE_DETAILED_METRICS=true
# =============================================================================
# SECURITY HEADERS
# =============================================================================
# Content Security Policy
CSP_DEFAULT_SRC="'self'"
CSP_SCRIPT_SRC="'self' 'unsafe-inline'"
CSP_STYLE_SRC="'self' 'unsafe-inline'"
# HSTS settings
HSTS_MAX_AGE=31536000
HSTS_INCLUDE_SUBDOMAINS=true
# =============================================================================
# NOTIFICATION SETTINGS (OPTIONAL)
# =============================================================================
# Email notifications
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=your-app-password
SMTP_FROM=noreply@yourcompany.com
# Webhook notifications
WEBHOOK_URL=https://your-webhook-endpoint.com/notify
# Slack notifications
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
# =============================================================================
# CUSTOM CONFIGURATION
# =============================================================================
# Add your custom environment variables here
# CUSTOM_SETTING_1=value1
# CUSTOM_SETTING_2=value2