Files
PecHub/.env.example
2026-03-19 16:55:31 +01:00

62 lines
3.8 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ─────────────────────────────────────────────────────────────────────────────
# PEChub Variabili d'ambiente
# Copia questo file in .env e personalizza i valori
# NON committare mai il file .env con valori reali
# ─────────────────────────────────────────────────────────────────────────────
# ── Applicazione ─────────────────────────────────────────────────────────────
APP_ENV=development # development | staging | production
APP_DEBUG=true
APP_HOST=0.0.0.0
APP_PORT=8000
APP_BASE_URL=http://localhost:8000
# ── Sicurezza ─────────────────────────────────────────────────────────────────
# Genera con: python -c "import secrets; print(secrets.token_hex(32))"
SECRET_KEY=change-me-generate-a-random-64-char-hex-string-here-00000000000000
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=15
REFRESH_TOKEN_EXPIRE_DAYS=30
# Chiave AES-256-GCM per cifratura credenziali IMAP/SMTP (32 bytes = 64 hex chars)
# Genera con: python -c "import secrets; print(secrets.token_hex(32))"
ENCRYPTION_KEY=change-me-generate-a-random-64-char-hex-string-here-11111111111
# ── Database PostgreSQL ───────────────────────────────────────────────────────
POSTGRES_HOST=db
POSTGRES_PORT=5432
POSTGRES_DB=pechub
POSTGRES_USER=pechub
POSTGRES_PASSWORD=pechub_dev_password
DATABASE_URL=postgresql+asyncpg://pechub:pechub_dev_password@db:5432/pechub
DATABASE_URL_SYNC=postgresql://pechub:pechub_dev_password@db:5432/pechub
# ── Redis ─────────────────────────────────────────────────────────────────────
REDIS_URL=redis://redis:6379/0
# ── MinIO (Object Storage) ────────────────────────────────────────────────────
MINIO_ENDPOINT=minio:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_BUCKET=pechub
MINIO_USE_SSL=false
# ── CORS ──────────────────────────────────────────────────────────────────────
CORS_ORIGINS=http://localhost:3000,http://localhost:5173
# ── Rate Limiting ─────────────────────────────────────────────────────────────
RATE_LIMIT_AUTH=10/minute # max 10 tentativi di login al minuto per IP
RATE_LIMIT_DEFAULT=100/minute
# ── Logging ───────────────────────────────────────────────────────────────────
LOG_LEVEL=INFO # DEBUG | INFO | WARNING | ERROR | CRITICAL
LOG_JSON=false # true in produzione per log strutturati JSON
# ── Email SMTP (per notifiche di sistema, NON caselle PEC) ───────────────────
SYSTEM_SMTP_HOST=
SYSTEM_SMTP_PORT=587
SYSTEM_SMTP_USER=
SYSTEM_SMTP_PASSWORD=
SYSTEM_SMTP_FROM=noreply@pechub.it