2.6 KiB
2.6 KiB
Environment Configuration — ERP Nutzfahrzeuge
Source: backend/.env.example (safe reference — no live values)
Required Variables
These variables MUST be set before the application can start.
| Variable | Description | Example (redacted) |
|---|---|---|
DATABASE_URL |
PostgreSQL async connection string | postgresql+asyncpg://user:***@host:5432/dbname |
JWT_SECRET |
Secret key for JWT signing (≥256 bits) | <redacted — generate with openssl rand -hex 32> |
Important Variables
| Variable | Default | Description |
|---|---|---|
REDIS_URL |
redis://localhost:6379/0 |
Redis connection for async task queues. Not required for JWT (stateless). Required for OCR/retouch/mobile.de async processing. |
JWT_ALGORITHM |
HS256 |
JWT signing algorithm |
JWT_ACCESS_TTL_MINUTES |
15 |
Access token TTL in minutes |
JWT_REFRESH_TTL_DAYS |
7 |
Refresh token TTL in days |
CORS_ORIGINS |
http://localhost:3000,http://localhost:3001 |
Comma-separated allowed origins. Add production frontend URL. |
UPLOAD_DIR |
/tmp/uploads |
File upload directory. Must be a persistent volume in production. |
APP_NAME |
ERP Nutzfahrzeuge |
Application display name |
APP_ENV |
development |
Set to production for deployment |
Optional Integration Variables
| Variable | Default | Description |
|---|---|---|
MOBILE_DE_API_KEY |
(empty) | mobile.de API key for vehicle listing push |
MOBILE_DE_SELLER_ID |
(empty) | mobile.de seller ID |
OPENROUTER_API_KEY |
(not set) | OpenRouter API key for AI Copilot features. Without this, Copilot endpoints will fail. |
BZST_API_ENABLED |
False |
Enable BZSt USt-IdNr. verification API |
Production Checklist
DATABASE_URLpoints to production PostgreSQL (managed or backed up)JWT_SECRETis a cryptographically secure random string (not placeholder)APP_ENV=productionCORS_ORIGINSincludes production frontend originUPLOAD_DIRpoints to a persistent volume mountREDIS_URLset if async features (OCR, retouch, mobile.de) are neededOPENROUTER_API_KEYset if AI Copilot is neededMOBILE_DE_API_KEYandMOBILE_DE_SELLER_IDset if mobile.de integration is needed
Coolify Configuration
In Coolify, set these as environment variables (or via .env file in the resource):
- Navigate to resource → Environment Variables
- Add each variable with its production value
- Redeploy after changes
Never commit real secret values to the repository. Use Coolify's secret management or an external secrets manager.