-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
106 lines (85 loc) · 4.14 KB
/
.env.example
File metadata and controls
106 lines (85 loc) · 4.14 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
# Metarr Environment Configuration
# Copy this file to .env and customize for your deployment
# ============================================================
# DATABASE CONFIGURATION
# ============================================================
# Database type: sqlite or postgres
DB_TYPE=sqlite
# PostgreSQL connection (only if DB_TYPE=postgres)
# DATABASE_URL=postgresql://user:password@localhost:5432/metarr
# Database performance tuning
DB_POOL_SIZE=5 # Connection pool size (default: 5)
DB_QUERY_TIMEOUT=30000 # Query timeout in ms (default: 30000)
DB_ENABLE_WAL=true # Enable WAL mode for SQLite (default: true)
# ============================================================
# JOB QUEUE CONFIGURATION
# ============================================================
JOB_QUEUE_WORKERS=5 # Max concurrent workers (default: 5)
JOB_QUEUE_POLL_INTERVAL=1000 # Poll interval in ms (default: 1000)
JOB_QUEUE_MAX_FAILURES=5 # Circuit breaker threshold (default: 5)
JOB_QUEUE_CIRCUIT_RESET_DELAY=60000 # Circuit reset delay in ms (default: 60000)
# ============================================================
# PROVIDER API KEYS (OPTIONAL - embedded defaults provided)
# ============================================================
# TMDB (The Movie Database)
# Get your key at: https://www.themoviedb.org/settings/api
# TMDB_API_KEY=your_api_key_here
# TVDB (The TV Database)
# Get your key at: https://thetvdb.com/dashboard/account/apikeys
# TVDB_API_KEY=your_api_key_here
# Fanart.tv
# Get your key at: https://fanart.tv/get-an-api-key/
# FANART_TV_API_KEY=your_api_key_here
# ============================================================
# PROVIDER RATE LIMITING
# ============================================================
TMDB_RATE_LIMIT=4 # Requests per second (default: 4)
TVDB_RATE_LIMIT=4 # Requests per second (default: 4)
FANART_RATE_LIMIT=2 # Requests per second (default: 2)
PROVIDER_REQUEST_TIMEOUT=10000 # Request timeout in ms (default: 10000)
PROVIDER_MAX_RETRIES=3 # Max retries per request (default: 3)
RATE_LIMITER_CLEANUP_INTERVAL=60000 # Cleanup interval in ms (default: 60000)
# ============================================================
# ASSET PROCESSING
# ============================================================
ASSET_MAX_CONCURRENT_DOWNLOADS=5 # Max concurrent downloads per job (default: 5)
ASSET_MAX_SIZE=52428800 # Max file size in bytes - 50MB (default: 52428800)
IMAGE_PROCESSING_TIMEOUT=30000 # Image analysis timeout in ms (default: 30000)
# ============================================================
# WEBSOCKET CONFIGURATION
# ============================================================
WS_STATS_THROTTLE=2000 # Stats broadcast throttle in ms (default: 2000)
WS_HEARTBEAT_INTERVAL=30000 # Heartbeat interval in ms (default: 30000)
# ============================================================
# STORAGE PATHS
# ============================================================
CACHE_PATH=/data/cache # Protected asset cache (default: /data/cache)
LIBRARY_PATH=/media # Media library root (default: /media)
# ============================================================
# LOGGING
# ============================================================
LOG_LEVEL=info # Log level: debug, info, warn, error (default: info)
LOG_TO_FILE=true # Enable file logging (default: true)
LOG_MAX_FILES=7 # Max log file rotation (default: 7)
LOG_MAX_SIZE=10m # Max log file size (default: 10m)
# ============================================================
# PERFORMANCE TUNING GUIDE
# ============================================================
#
# Small Home Server (4GB RAM, 2 cores):
# JOB_QUEUE_WORKERS=3
# DB_POOL_SIZE=3
# ASSET_MAX_CONCURRENT_DOWNLOADS=3
#
# Medium Deployment (8GB RAM, 4 cores):
# JOB_QUEUE_WORKERS=8
# DB_POOL_SIZE=8
# ASSET_MAX_CONCURRENT_DOWNLOADS=8
#
# Large Deployment (16GB+ RAM, 8+ cores):
# JOB_QUEUE_WORKERS=15
# DB_POOL_SIZE=10
# ASSET_MAX_CONCURRENT_DOWNLOADS=10
# DB_TYPE=postgres (recommended)
#
# ============================================================