-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
113 lines (101 loc) · 4.16 KB
/
Copy path.env.example
File metadata and controls
113 lines (101 loc) · 4.16 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
# ===========================================================================
# Application
# ===========================================================================
APP_NAME=ProfPlan
APP_ENV=development
DEBUG=true
SECRET_KEY=change-me
API_PREFIX=/api/v1
# CORS — comma-separated. Only used in development (production is same-origin
# behind Traefik). Vite dev server default is http://localhost:5173
ALLOWED_ORIGINS=http://localhost:5173
# ===========================================================================
# Database (PostgreSQL + pgvector)
# ===========================================================================
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_USER=profplan
POSTGRES_PASSWORD=change-me
POSTGRES_DB=profplan
DATABASE_URL=postgresql+asyncpg://profplan:change-me@postgres:5432/profplan
# ===========================================================================
# Redis
# ===========================================================================
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
REDIS_URL=redis://redis:6379/0
# ===========================================================================
# Celery
# ===========================================================================
CELERY_BROKER_URL=redis://redis:6379/1
CELERY_RESULT_BACKEND=redis://redis:6379/2
# ===========================================================================
# Object storage (MinIO)
# ===========================================================================
MINIO_ENDPOINT=minio:9000
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=change-me
MINIO_BUCKET=profplan
MINIO_SECURE=false
# ===========================================================================
# Authentication (JWT + cookies)
# ===========================================================================
# Generate strong values, e.g. `openssl rand -hex 32`
JWT_ACCESS_SECRET=change-me-access
JWT_REFRESH_SECRET=change-me-refresh
JWT_ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=15
REFRESH_TOKEN_EXPIRE_DAYS=30
# Cookies — set COOKIE_SECURE=true behind HTTPS
COOKIE_SECURE=false
COOKIE_SAMESITE=lax
COOKIE_DOMAIN=
# Login rate limiting (Redis) — per-account failed-attempt lockout
LOGIN_RATE_LIMIT_MAX_ATTEMPTS=5
LOGIN_RATE_LIMIT_WINDOW_SECONDS=300
# Global per-IP rate limiting (slowapi + Redis) — protects every route from
# floods/DoS. Limits use slowapi syntax "<count>/<period>".
RATE_LIMIT_ENABLED=true
RATE_LIMIT_DEFAULT=120/minute
RATE_LIMIT_AUTH=10/minute
RATE_LIMIT_EXPENSIVE=20/minute
RATE_LIMIT_STORAGE_URL=redis://redis:6379/3
# Security response headers (CSP, X-Frame-Options, ...). HSTS follows the
# environment by default (on in production); override with HSTS_ENABLED.
SECURITY_HEADERS_ENABLED=true
# HSTS_ENABLED=true
# Uploads — reject files larger than this before they can exhaust memory.
MAX_UPLOAD_SIZE_MB=100
# ===========================================================================
# AI / LLM providers
# ===========================================================================
# LLM gateway fallback chain: Claude -> OpenAI -> Ollama (local).
# Leave a key empty to skip that provider (Ollama needs no key).
ANTHROPIC_API_KEY=
ANTHROPIC_MODEL=claude-sonnet-5
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o
GEMINI_API_KEY=
GEMINI_MODEL=gemini-2.5-flash
OLLAMA_CHAT_MODEL=llama3.2:3b
LLM_MAX_TOKENS=8192
LLM_TIMEOUT_SECONDS=60
LLM_CIRCUIT_FAILURE_THRESHOLD=3
LLM_CIRCUIT_RESET_SECONDS=30
# Auto-generate the plan with AI on creation (planner + fan-out). Set false in
# environments without an LLM (e.g. CI) to create plain plans with no AI call.
PLAN_GENERATION_ENABLED=true
OLLAMA_BASE_URL=http://ollama:11434
# bge-m3 is multilingual (great for Portuguese) and 1024-dimensional.
# Must match EMBEDDING_DIMENSIONS in app/core/constants.py.
EMBEDDING_MODEL=bge-m3
# Cache embeddings in Redis to avoid re-embedding identical text (7 days).
EMBEDDING_CACHE_TTL_SECONDS=604800
# ===========================================================================
# Observability
# ===========================================================================
# Distributed tracing (needs the observability profile: otel-collector + tempo)
OTEL_ENABLED=false
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
LOG_LEVEL=INFO