forked from ruvnet/RuView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.env
More file actions
205 lines (167 loc) · 6.88 KB
/
example.env
File metadata and controls
205 lines (167 loc) · 6.88 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
# WiFi-DensePose API Environment Configuration Template
# Copy this file to .env and modify the values according to your setup
# =============================================================================
# APPLICATION SETTINGS
# =============================================================================
# Application metadata
APP_NAME=WiFi-DensePose API
VERSION=1.0.0
ENVIRONMENT=development # Options: development, staging, production
DEBUG=true
# =============================================================================
# SERVER SETTINGS
# =============================================================================
# Server configuration
HOST=0.0.0.0
PORT=8000
RELOAD=true # Auto-reload on code changes (development only)
WORKERS=1 # Number of worker processes
# =============================================================================
# SECURITY SETTINGS
# =============================================================================
# IMPORTANT: Change these values for production!
SECRET_KEY=your-secret-key-here-change-for-production
JWT_ALGORITHM=HS256
JWT_EXPIRE_HOURS=24
# Allowed hosts (restrict in production)
ALLOWED_HOSTS=* # Use specific domains in production: example.com,api.example.com
# CORS settings (restrict in production)
CORS_ORIGINS=* # Use specific origins in production: https://example.com,https://app.example.com
# =============================================================================
# DATABASE SETTINGS
# =============================================================================
# Database connection (optional - defaults to SQLite in development)
# For PostgreSQL (recommended for production):
DATABASE_URL=postgresql://wifi_user:wifi_password@localhost:5432/wifi_densepose
DATABASE_POOL_SIZE=10
DATABASE_MAX_OVERFLOW=20
# Alternative: Individual database connection parameters
# DB_HOST=localhost
# DB_PORT=5432
# DB_NAME=wifi_densepose
# DB_USER=wifi_user
# DB_PASSWORD=wifi_password
# Database failsafe settings
ENABLE_DATABASE_FAILSAFE=true
SQLITE_FALLBACK_PATH=./data/wifi_densepose_fallback.db
# =============================================================================
# REDIS SETTINGS (Optional - for caching and rate limiting)
# =============================================================================
# Redis connection (optional - defaults to localhost in development)
REDIS_URL=redis://localhost:6379/0
# REDIS_PASSWORD=your-redis-password
REDIS_DB=0
REDIS_ENABLED=true
REDIS_REQUIRED=false
ENABLE_REDIS_FAILSAFE=true
# Redis connection settings
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_MAX_CONNECTIONS=10
REDIS_SOCKET_TIMEOUT=5
REDIS_CONNECT_TIMEOUT=5
# =============================================================================
# HARDWARE SETTINGS
# =============================================================================
# WiFi interface configuration
WIFI_INTERFACE=wlan0
CSI_BUFFER_SIZE=1000
HARDWARE_POLLING_INTERVAL=0.1
# Hardware mock settings (for development/testing)
MOCK_HARDWARE=true
MOCK_POSE_DATA=true
# =============================================================================
# POSE ESTIMATION SETTINGS
# =============================================================================
# Model configuration
# POSE_MODEL_PATH=/path/to/your/pose/model.pth
POSE_CONFIDENCE_THRESHOLD=0.5
POSE_PROCESSING_BATCH_SIZE=32
POSE_MAX_PERSONS=10
# =============================================================================
# STREAMING SETTINGS
# =============================================================================
# Real-time streaming configuration
STREAM_FPS=30
STREAM_BUFFER_SIZE=100
WEBSOCKET_PING_INTERVAL=60
WEBSOCKET_TIMEOUT=300
# =============================================================================
# FEATURE FLAGS
# =============================================================================
# Enable/disable features
ENABLE_AUTHENTICATION=false # Set to true for production
ENABLE_RATE_LIMITING=false # Set to true for production
ENABLE_WEBSOCKETS=true
ENABLE_REAL_TIME_PROCESSING=true
ENABLE_HISTORICAL_DATA=true
# Development features
ENABLE_TEST_ENDPOINTS=true # Set to false for production
# =============================================================================
# RATE LIMITING SETTINGS
# =============================================================================
# Rate limiting configuration
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_AUTHENTICATED_REQUESTS=1000
RATE_LIMIT_WINDOW=3600 # Window in seconds
# =============================================================================
# LOGGING SETTINGS
# =============================================================================
# Logging configuration
LOG_LEVEL=INFO # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_FORMAT=%(asctime)s - %(name)s - %(levelname)s - %(message)s
# LOG_FILE=/path/to/logfile.log # Optional: specify log file path
LOG_MAX_SIZE=10485760 # 10MB
LOG_BACKUP_COUNT=5
# =============================================================================
# STORAGE SETTINGS
# =============================================================================
# Storage directories
DATA_STORAGE_PATH=./data
MODEL_STORAGE_PATH=./models
TEMP_STORAGE_PATH=./temp
MAX_STORAGE_SIZE_GB=100
# =============================================================================
# MONITORING SETTINGS
# =============================================================================
# Monitoring and metrics
METRICS_ENABLED=true
HEALTH_CHECK_INTERVAL=30
PERFORMANCE_MONITORING=true
# =============================================================================
# API SETTINGS
# =============================================================================
# API configuration
API_PREFIX=/api/v1
DOCS_URL=/docs # Set to null to disable in production
REDOC_URL=/redoc # Set to null to disable in production
OPENAPI_URL=/openapi.json # Set to null to disable in production
# =============================================================================
# PRODUCTION SETTINGS
# =============================================================================
# For production deployment, ensure you:
# 1. Set ENVIRONMENT=production
# 2. Set DEBUG=false
# 3. Use a strong SECRET_KEY
# 4. Configure proper DATABASE_URL
# 5. Restrict ALLOWED_HOSTS and CORS_ORIGINS
# 6. Enable ENABLE_AUTHENTICATION=true
# 7. Enable ENABLE_RATE_LIMITING=true
# 8. Set ENABLE_TEST_ENDPOINTS=false
# 9. Disable API documentation URLs (set to null)
# 10. Configure proper logging with LOG_FILE
# Example production settings:
# ENVIRONMENT=production
# DEBUG=false
# SECRET_KEY=your-very-secure-secret-key-here
# DATABASE_URL=postgresql://user:password@db-host:5432/wifi_densepose
# REDIS_URL=redis://redis-host:6379/0
# ALLOWED_HOSTS=yourdomain.com,api.yourdomain.com
# CORS_ORIGINS=https://yourdomain.com,https://app.yourdomain.com
# ENABLE_AUTHENTICATION=true
# ENABLE_RATE_LIMITING=true
# ENABLE_TEST_ENDPOINTS=false
# DOCS_URL=null
# REDOC_URL=null
# OPENAPI_URL=null
# LOG_FILE=/var/log/wifi-densepose/app.log