mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-02 21:13:45 +00:00
57 lines
1.5 KiB
Plaintext
57 lines
1.5 KiB
Plaintext
# Database Configuration
|
|
DATABASE_URL="postgresql://patchmon_user:your-password-here@localhost:5432/patchmon_db"
|
|
PM_DB_CONN_MAX_ATTEMPTS=30
|
|
PM_DB_CONN_WAIT_INTERVAL=2
|
|
|
|
# Database Connection Pool Configuration (Prisma)
|
|
DB_CONNECTION_LIMIT=30 # Maximum connections per instance (default: 30)
|
|
DB_POOL_TIMEOUT=20 # Seconds to wait for available connection (default: 20)
|
|
DB_CONNECT_TIMEOUT=10 # Seconds to wait for initial connection (default: 10)
|
|
DB_IDLE_TIMEOUT=300 # Seconds before closing idle connections (default: 300)
|
|
DB_MAX_LIFETIME=1800 # Maximum lifetime of a connection in seconds (default: 1800)
|
|
|
|
# JWT Configuration
|
|
JWT_SECRET=your-secure-random-secret-key-change-this-in-production
|
|
JWT_EXPIRES_IN=1h
|
|
JWT_REFRESH_EXPIRES_IN=7d
|
|
|
|
# Server Configuration
|
|
PORT=3001
|
|
NODE_ENV=production
|
|
|
|
# API Configuration
|
|
API_VERSION=v1
|
|
|
|
# CORS Configuration
|
|
CORS_ORIGIN=http://localhost:3000
|
|
|
|
# Session Configuration
|
|
SESSION_INACTIVITY_TIMEOUT_MINUTES=30
|
|
|
|
# User Configuration
|
|
DEFAULT_USER_ROLE=user
|
|
|
|
# Rate Limiting (times in milliseconds)
|
|
RATE_LIMIT_WINDOW_MS=900000
|
|
RATE_LIMIT_MAX=5000
|
|
AUTH_RATE_LIMIT_WINDOW_MS=600000
|
|
AUTH_RATE_LIMIT_MAX=500
|
|
AGENT_RATE_LIMIT_WINDOW_MS=60000
|
|
AGENT_RATE_LIMIT_MAX=1000
|
|
|
|
# Redis Configuration
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6379
|
|
REDIS_USER=your-redis-username-here
|
|
REDIS_PASSWORD=your-redis-password-here
|
|
REDIS_DB=0
|
|
|
|
# Logging
|
|
LOG_LEVEL=info
|
|
ENABLE_LOGGING=true
|
|
|
|
# TFA Configuration (optional - used if TFA is enabled)
|
|
TFA_REMEMBER_ME_EXPIRES_IN=30d
|
|
TFA_MAX_REMEMBER_SESSIONS=5
|
|
TFA_SUSPICIOUS_ACTIVITY_THRESHOLD=3
|