Spaces:
Runtime error
Runtime error
Commit ·
b933b36
1
Parent(s): fdeaede
refactor: update environment configuration for database and storage settings
Browse files- .env.example +61 -32
.env.example
CHANGED
|
@@ -5,46 +5,43 @@ DEBUG=false
|
|
| 5 |
|
| 6 |
# MongoDB Configuration
|
| 7 |
MONGODB_URI=mongodb://localhost:27017
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
# PostgreSQL Configuration
|
| 11 |
DB_PROTOCOL=postgresql+asyncpg
|
| 12 |
DB_USER=postgres
|
| 13 |
-
DB_PASSWORD=
|
| 14 |
DB_HOST=localhost
|
| 15 |
DB_PORT=5432
|
| 16 |
DB_NAME=cuatrolabs
|
| 17 |
DB_MIN_POOL_SIZE=5
|
| 18 |
DB_MAX_POOL_SIZE=20
|
| 19 |
-
|
|
|
|
| 20 |
|
| 21 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
REDIS_HOST=localhost
|
| 23 |
REDIS_PORT=6379
|
| 24 |
-
REDIS_PASSWORD=
|
| 25 |
REDIS_DB=0
|
| 26 |
|
| 27 |
-
# MinIO / Object Storage Configuration
|
| 28 |
-
# API Endpoint (port 9000), Console UI at http://localhost:9001/browser
|
| 29 |
-
MINIO_ENDPOINT=localhost:9000
|
| 30 |
-
MINIO_ACCESS_KEY=minioadmin
|
| 31 |
-
MINIO_SECRET_KEY=minioadmin
|
| 32 |
-
MINIO_SECURE=false
|
| 33 |
-
MINIO_REGION=
|
| 34 |
-
|
| 35 |
-
# Storage Configuration (using cutra-scm naming scheme)
|
| 36 |
-
STORAGE_BUCKET_DOCUMENTS_PRIVATE=cutra-scm-documents
|
| 37 |
-
STORAGE_BUCKET_IMAGES_PRIVATE=cutra-scm-images
|
| 38 |
-
STORAGE_BUCKET_IMAGES_PUBLIC=cutra-scm-images-public
|
| 39 |
-
STORAGE_BUCKET_EXPORTS_TEMP=cutra-scm-exports
|
| 40 |
-
STORAGE_MAX_IMAGE_MB=10
|
| 41 |
-
STORAGE_MAX_DOC_MB=50
|
| 42 |
-
STORAGE_PRESIGN_EXPIRY_SECONDS=900
|
| 43 |
-
STORAGE_ALLOWED_IMAGE_MIME=image/png,image/jpeg,image/jpg,image/webp,image/svg+xml
|
| 44 |
-
STORAGE_ALLOWED_DOC_MIME=application/pdf,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/plain,text/csv,application/json
|
| 45 |
-
|
| 46 |
# JWT Configuration
|
| 47 |
-
SECRET_KEY=your-secret-key-change-in-production
|
| 48 |
ALGORITHM=HS256
|
| 49 |
TOKEN_EXPIRATION_HOURS=8
|
| 50 |
|
|
@@ -54,17 +51,49 @@ OTP_RATE_LIMIT_MAX=10
|
|
| 54 |
OTP_RATE_LIMIT_WINDOW=600
|
| 55 |
|
| 56 |
# Twilio Configuration (SMS)
|
| 57 |
-
TWILIO_ACCOUNT_SID=
|
| 58 |
-
TWILIO_AUTH_TOKEN=
|
| 59 |
-
TWILIO_PHONE_NUMBER=
|
| 60 |
|
| 61 |
-
# SMTP Configuration (Email)
|
| 62 |
SMTP_HOST=smtp.gmail.com
|
| 63 |
SMTP_PORT=587
|
| 64 |
-
SMTP_USERNAME=
|
| 65 |
-
SMTP_PASSWORD=
|
| 66 |
-
SMTP_FROM_EMAIL=
|
| 67 |
SMTP_USE_TLS=true
|
| 68 |
|
| 69 |
# Logging Configuration
|
| 70 |
LOG_LEVEL=INFO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
# MongoDB Configuration
|
| 7 |
MONGODB_URI=mongodb://localhost:27017
|
| 8 |
+
# For MongoDB Atlas: mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true&w=majority
|
| 9 |
+
MONGODB_DB_NAME=cuatrolabs
|
| 10 |
|
| 11 |
# PostgreSQL Configuration
|
| 12 |
DB_PROTOCOL=postgresql+asyncpg
|
| 13 |
DB_USER=postgres
|
| 14 |
+
DB_PASSWORD=your-db-password
|
| 15 |
DB_HOST=localhost
|
| 16 |
DB_PORT=5432
|
| 17 |
DB_NAME=cuatrolabs
|
| 18 |
DB_MIN_POOL_SIZE=5
|
| 19 |
DB_MAX_POOL_SIZE=20
|
| 20 |
+
DB_SSLMODE=disable
|
| 21 |
+
DATABASE_URL=postgresql+asyncpg://postgres:your-db-password@localhost:5432/cuatrolabs
|
| 22 |
|
| 23 |
+
# Sync Configuration
|
| 24 |
+
SYNC_RETRY_MAX_ATTEMPTS=3
|
| 25 |
+
SYNC_RETRY_BASE_DELAY=1.0
|
| 26 |
+
SYNC_RETRY_MAX_DELAY=60.0
|
| 27 |
+
SYNC_BULK_BATCH_SIZE=100
|
| 28 |
+
SYNC_QUEUE_MAX_SIZE=1000
|
| 29 |
+
SYNC_WORKER_COUNT=5
|
| 30 |
+
|
| 31 |
+
# Monitoring Configuration
|
| 32 |
+
SYNC_QUEUE_WARNING_THRESHOLD=500
|
| 33 |
+
SYNC_QUEUE_CRITICAL_THRESHOLD=800
|
| 34 |
+
SYNC_FAILURE_RATE_WARNING=0.05
|
| 35 |
+
SYNC_FAILURE_RATE_CRITICAL=0.10
|
| 36 |
+
|
| 37 |
+
# Redis Configuration (for caching and session management)
|
| 38 |
REDIS_HOST=localhost
|
| 39 |
REDIS_PORT=6379
|
| 40 |
+
REDIS_PASSWORD=your-redis-password
|
| 41 |
REDIS_DB=0
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
# JWT Configuration
|
| 44 |
+
SECRET_KEY=your-secret-key-here-change-in-production
|
| 45 |
ALGORITHM=HS256
|
| 46 |
TOKEN_EXPIRATION_HOURS=8
|
| 47 |
|
|
|
|
| 51 |
OTP_RATE_LIMIT_WINDOW=600
|
| 52 |
|
| 53 |
# Twilio Configuration (SMS)
|
| 54 |
+
TWILIO_ACCOUNT_SID=
|
| 55 |
+
TWILIO_AUTH_TOKEN=
|
| 56 |
+
TWILIO_PHONE_NUMBER=
|
| 57 |
|
| 58 |
+
# SMTP Configuration (Email) - Gmail Example
|
| 59 |
SMTP_HOST=smtp.gmail.com
|
| 60 |
SMTP_PORT=587
|
| 61 |
+
SMTP_USERNAME=your-email@gmail.com
|
| 62 |
+
SMTP_PASSWORD=your-app-password
|
| 63 |
+
SMTP_FROM_EMAIL=your-email@gmail.com
|
| 64 |
SMTP_USE_TLS=true
|
| 65 |
|
| 66 |
# Logging Configuration
|
| 67 |
LOG_LEVEL=INFO
|
| 68 |
+
|
| 69 |
+
# CORS Settings
|
| 70 |
+
CORS_ORIGINS=["http://localhost:3000","http://localhost:8000","http://localhost:8002"]
|
| 71 |
+
|
| 72 |
+
# MinIO Configuration
|
| 73 |
+
MINIO_ENDPOINT=localhost:9000
|
| 74 |
+
MINIO_ACCESS_KEY=minioadmin
|
| 75 |
+
MINIO_SECRET_KEY=minioadmin
|
| 76 |
+
MINIO_SECURE=false
|
| 77 |
+
MINIO_REGION=
|
| 78 |
+
|
| 79 |
+
# Storage Configuration
|
| 80 |
+
STORAGE_BUCKET_DOCUMENTS_PRIVATE=cutra-scm-documents
|
| 81 |
+
STORAGE_BUCKET_IMAGES_PRIVATE=cutra-scm-images
|
| 82 |
+
STORAGE_BUCKET_IMAGES_PUBLIC=cutra-scm-images-public
|
| 83 |
+
STORAGE_BUCKET_EXPORTS_TEMP=cutra-scm-exports
|
| 84 |
+
STORAGE_MAX_IMAGE_MB=10
|
| 85 |
+
STORAGE_MAX_DOC_MB=50
|
| 86 |
+
STORAGE_PRESIGN_EXPIRY_SECONDS=900
|
| 87 |
+
|
| 88 |
+
# Public URL Configuration
|
| 89 |
+
# CDN Configuration for public images (Cloudflare)
|
| 90 |
+
STORAGE_PUBLIC_BASE_URL=https://cdn.example.com
|
| 91 |
+
STORAGE_ENABLE_PUBLIC_URLS=true
|
| 92 |
+
|
| 93 |
+
# CDN Cache Settings
|
| 94 |
+
STORAGE_CDN_CACHE_TTL=86400 # 24 hours in seconds
|
| 95 |
+
STORAGE_CDN_BROWSER_TTL=3600 # 1 hour in seconds
|
| 96 |
+
|
| 97 |
+
# MIME Type Allowlists
|
| 98 |
+
STORAGE_ALLOWED_IMAGE_MIME=image/png,image/jpeg,image/jpg,image/webp,image/svg+xml
|
| 99 |
+
STORAGE_ALLOWED_DOC_MIME=application/pdf,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/plain,text/csv,application/json
|