All checks were successful
CI / test (push) Successful in 21s
Email delivery: - Replaced logging-only email sender with aiosmtplib SMTP implementation. - Added provider mode switch via EMAIL_PROVIDER (log/smtp). - Added TLS/SSL and timeout controls for SMTP transport. Auth registration flow: - Made register/resend/reset email flows transactional with rollback on delivery failure. - Return 503 when verification/reset email cannot be delivered. Configuration: - Extended settings and env templates for EMAIL_PROVIDER, SMTP_USE_SSL, SMTP_TIMEOUT_SECONDS. - Updated docker-compose environment mapping for new SMTP variables.
61 lines
1.2 KiB
Plaintext
61 lines
1.2 KiB
Plaintext
# Core
|
|
APP_NAME=BenyaMessenger
|
|
ENVIRONMENT=production
|
|
DEBUG=false
|
|
API_V1_PREFIX=/api/v1
|
|
AUTO_CREATE_TABLES=true
|
|
SECRET_KEY=replace-with-long-random-secret
|
|
JWT_ALGORITHM=HS256
|
|
ACCESS_TOKEN_EXPIRE_MINUTES=30
|
|
REFRESH_TOKEN_EXPIRE_DAYS=30
|
|
EMAIL_VERIFICATION_TOKEN_EXPIRE_HOURS=24
|
|
PASSWORD_RESET_TOKEN_EXPIRE_HOURS=1
|
|
|
|
# DB
|
|
POSTGRES_DB=messenger
|
|
POSTGRES_USER=postgres
|
|
POSTGRES_PASSWORD=postgres
|
|
POSTGRES_PORT=5432
|
|
|
|
# Redis
|
|
REDIS_PORT=6379
|
|
|
|
# MinIO
|
|
MINIO_ROOT_USER=minioadmin
|
|
MINIO_ROOT_PASSWORD=minioadmin
|
|
MINIO_API_PORT=9000
|
|
MINIO_CONSOLE_PORT=9001
|
|
S3_REGION=us-east-1
|
|
S3_BUCKET_NAME=messenger-media
|
|
S3_PRESIGN_EXPIRE_SECONDS=900
|
|
MAX_UPLOAD_SIZE_BYTES=104857600
|
|
|
|
# Public URLs
|
|
FRONTEND_BASE_URL=http://localhost
|
|
WEB_PORT=80
|
|
BACKEND_PORT=8000
|
|
|
|
# Mail
|
|
SMTP_HOST=mailpit
|
|
SMTP_PORT=1025
|
|
SMTP_USERNAME=
|
|
SMTP_PASSWORD=
|
|
EMAIL_PROVIDER=log
|
|
SMTP_USE_TLS=false
|
|
SMTP_USE_SSL=false
|
|
SMTP_TIMEOUT_SECONDS=10
|
|
SMTP_FROM_EMAIL=no-reply@benyamessenger.local
|
|
MAILPIT_SMTP_PORT=1025
|
|
MAILPIT_UI_PORT=8025
|
|
|
|
# Security Limits
|
|
LOGIN_RATE_LIMIT_PER_MINUTE=10
|
|
REGISTER_RATE_LIMIT_PER_MINUTE=5
|
|
RESET_RATE_LIMIT_PER_MINUTE=5
|
|
REFRESH_RATE_LIMIT_PER_MINUTE=30
|
|
MESSAGE_RATE_LIMIT_PER_MINUTE=30
|
|
DUPLICATE_MESSAGE_COOLDOWN_SECONDS=10
|
|
|
|
# Dev/Test utility
|
|
CELERY_TASK_ALWAYS_EAGER=false
|