-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.sample
More file actions
66 lines (54 loc) · 1.93 KB
/
env.sample
File metadata and controls
66 lines (54 loc) · 1.93 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
# DeeperSensor API Environment Sample
# Copy to .env and adjust values.
# Profiles: set APP_ENV=local|production to toggle behavior.
# --- Application Runtime ---
APP_ENV=local
APP_NAME=deepersensor-api
APP_HOST=0.0.0.0
APP_PORT=8080
# Public base URL (used for CORS / links)
APP_PUBLIC_URL=http://localhost:8080
# --- Logging & Observability ---
RUST_LOG=info,api=debug
LOG_FORMAT=text # text|json
REQUEST_ID_HEADER=X-Request-Id
# --- Security / Auth (placeholders; rotate in production) ---
JWT_SECRET=replace_with_secure_random_64_bytes
JWT_ISSUER=deepersensor
JWT_ACCESS_TTL_SECS=900 # 15m
JWT_REFRESH_TTL_SECS=1209600 # 14d
ALLOWED_ORIGINS=http://localhost:3000
# --- Rate Limiting ---
RATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS_PER_MINUTE=60
RATE_LIMIT_BURST=20
# Distinguish by IP when unauthenticated; by user after auth
# --- Upstream Model Provider (Ollama) ---
OLLAMA_BASE_URL=http://ollama:11434
OLLAMA_DEFAULT_TIMEOUT_MS=30000
# --- Redis (for rate limiting, sessions, caching) ---
REDIS_URL=redis://redis:6379/0
# --- Database (future Postgres; optional now) ---
# DATABASE_URL for local development (running directly on host)
DATABASE_URL=postgres://postgres:postgres@localhost:5432/deepersensor
# For docker-compose internal network, comment the line above and uncomment below
# DATABASE_URL=postgres://postgres:postgres@postgres:5432/deepersensor
# --- HTTP Server Tunables ---
SERVER_READ_TIMEOUT_SECS=15
SERVER_WRITE_TIMEOUT_SECS=30
SERVER_IDLE_TIMEOUT_SECS=120
MAX_REQUEST_SIZE_BYTES=1048576
# --- CORS & Security Headers ---
CORS_ALLOW_CREDENTIALS=false
CORS_ALLOW_HEADERS=Authorization,Content-Type
CORS_EXPOSE_HEADERS=Authorization,Content-Type
# Comma separated methods
CORS_ALLOW_METHODS=GET,POST,OPTIONS
# --- Nginx / Proxy (informational) ---
TRUSTED_PROXY_IPS=127.0.0.1,::1
FORCE_HTTPS=false
# --- Metrics / Telemetry (future) ---
METRICS_ENABLED=false
PROMETHEUS_BIND=0.0.0.0:9500
# --- Build / Misc ---
GIT_SHA=dev