-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_dot_env
More file actions
100 lines (79 loc) · 2.53 KB
/
edit_dot_env
File metadata and controls
100 lines (79 loc) · 2.53 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
# ===========================================
# PyHellen Configuration
# ===========================================
# Copy this file to .env and edit as needed
# ===========================================
# ===================
# Model Storage
# ===================
# Path where NLP models will be downloaded and stored
# Leave empty to use default: ~/.local/share/pyhellen
DOWNLOAD_MODEL_PATH=""
# Models to preload at startup (comma-separated)
# Example: PRELOAD_MODELS="lasla,grc"
PRELOAD_MODELS=""
# ===================
# Security Settings
# ===================
# Enable token-based authentication
# When False (default), API is publicly accessible
AUTH_ENABLED=false
# Secret key for token hashing (REQUIRED if AUTH_ENABLED=true)
# Generate a secure key with: python -c "import secrets; print(secrets.token_urlsafe(32))"
# NEVER commit this to version control!
SECRET_KEY=""
# Path to SQLite database for tokens
TOKEN_DB_PATH="tokens.db"
# Automatically create admin token on first run
AUTO_CREATE_ADMIN_TOKEN=true
# ===================
# CORS Settings
# ===================
# Allowed origins (comma-separated)
# Use "*" for development only! In production, list specific origins.
# Example: CORS_ORIGINS="https://example.com,https://app.example.com"
CORS_ORIGINS="*"
# Allow credentials (cookies, authorization headers)
# Cannot be true if CORS_ORIGINS contains "*"
CORS_ALLOW_CREDENTIALS=false
# ===================
# Rate Limiting (Optional)
# ===================
# Enable rate limiting per IP
RATE_LIMIT_ENABLED=false
# Maximum requests per time window
RATE_LIMIT_REQUESTS=100
# Time window in seconds
RATE_LIMIT_WINDOW_SECONDS=60
# ===================
# Processing Settings
# ===================
# Maximum concurrent text processing tasks
MAX_CONCURRENT_PROCESSING=10
# Batch size for model processing
BATCH_SIZE=256
# Model download timeout in seconds
DOWNLOAD_TIMEOUT_SECONDS=300
# Maximum retry attempts for failed downloads
DOWNLOAD_MAX_RETRIES=3
# ===================
# Metrics
# ===================
# Enable performance metrics collection
ENABLE_METRICS=true
# ===================
# Logging
# ===================
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL=INFO
# Log format: 'json' for production (structured), 'text' for development, 'auto' to detect
LOG_FORMAT=auto
# Optional: Log file path (in addition to stdout). Leave empty for stdout only.
LOG_FILE=""
# ===================
# SSL/TLS (Optional)
# ===================
# Path to SSL key file (for HTTPS)
SSL_KEYFILE=""
# Path to SSL certificate file (for HTTPS)
SSL_CERTFILE=""