mirror of
https://github.com/Dvorinka/Trackeep.git
synced 2026-06-03 20:12:58 +00:00
9a580c77d2
- Replace Redis with DragonflyDB for better performance and memory efficiency - Remove redundant environment variables (POSTGRES_*, ENCRYPTION_KEY, OAUTH_SERVICE_URL) - Consolidate database configuration to use single DB_* variables - Use JWT_SECRET for both JWT tokens and encryption - Remove PORT variable redundancy, use BACKEND_PORT consistently - Clean up docker-compose configurations for dev/prod consistency - Add DragonflyDB configuration with optimized memory usage - Remove redis.conf as it's no longer needed - Update health checks to use Redis-compatible CLI for DragonflyDB
113 lines
3.2 KiB
Plaintext
113 lines
3.2 KiB
Plaintext
# DragonflyDB Configuration for Trackeep
|
|
#
|
|
# DragonflyDB is a modern Redis-compatible in-memory database
|
|
# Optimized for performance and lower memory usage
|
|
|
|
# =============================================================================
|
|
# NETWORK
|
|
# =============================================================================
|
|
|
|
# Accept connections on all interfaces (safe when behind Docker network)
|
|
bind 0.0.0.0
|
|
|
|
# Default port (same as Redis for compatibility)
|
|
port 6379
|
|
|
|
# TCP listen() backlog
|
|
tcp-backlog 511
|
|
|
|
# Close connection after N seconds of idle time (0 = disabled)
|
|
timeout 0
|
|
|
|
# TCP keepalive
|
|
tcp-keepalive 300
|
|
|
|
# =============================================================================
|
|
# SECURITY
|
|
# =============================================================================
|
|
|
|
# Require password for connections
|
|
# Set via environment variable: requirepass ${DRAGONFLY_PASSWORD}
|
|
requirepass dragonfly123
|
|
|
|
# Disable dangerous commands in production
|
|
rename-command FLUSHDB ""
|
|
rename-command FLUSHALL ""
|
|
rename-command CONFIG "CONFIG_9f8a2b3c"
|
|
rename-command DEBUG ""
|
|
rename-command SHUTDOWN "SHUTDOWN_7d4e1f9a"
|
|
|
|
# =============================================================================
|
|
# MEMORY MANAGEMENT
|
|
# =============================================================================
|
|
|
|
# Maximum memory limit (256MB suitable for small-medium deployments)
|
|
# DragonflyDB is more memory efficient than Redis
|
|
maxmemory 256mb
|
|
|
|
# Eviction policy when maxmemory is reached
|
|
# allkeys-lru: Remove less recently used keys first (recommended for caching)
|
|
maxmemory-policy allkeys-lru
|
|
|
|
# =============================================================================
|
|
# PERSISTENCE
|
|
# =============================================================================
|
|
|
|
# Enable AOF persistence (recommended for session durability)
|
|
appendonly yes
|
|
|
|
# AOF file name
|
|
appendfilename "appendonly.aof"
|
|
|
|
# Sync strategy: everysec (recommended balance)
|
|
appendfsync everysec
|
|
|
|
# Auto-rewrite AOF when it grows by X%
|
|
auto-aof-rewrite-percentage 100
|
|
|
|
# Minimum size before auto-rewrite
|
|
auto-aof-rewrite-min-size 64mb
|
|
|
|
# Working directory for persistence
|
|
dir /data
|
|
|
|
# =============================================================================
|
|
# CLIENTS & PERFORMANCE
|
|
# =============================================================================
|
|
|
|
# Maximum number of client connections
|
|
maxclients 10000
|
|
|
|
# Number of databases (default 16)
|
|
databases 16
|
|
|
|
# Latency monitoring
|
|
latency-monitor-threshold 100
|
|
|
|
# Slow log (log queries taking > N microseconds)
|
|
slowlog-log-slower-than 10000
|
|
|
|
# Slow log max length
|
|
slowlog-max-len 128
|
|
|
|
# =============================================================================
|
|
# LOGGING
|
|
# =============================================================================
|
|
|
|
# Log level: debug, verbose, notice, warning
|
|
loglevel notice
|
|
|
|
# Log file (empty = stdout, good for Docker)
|
|
logfile ""
|
|
|
|
# =============================================================================
|
|
# DRAGONFLYDB SPECIFIC OPTIMIZATIONS
|
|
# =============================================================================
|
|
|
|
# Enable DragonflyDB-specific optimizations
|
|
# These are automatically enabled in DragonflyDB
|
|
|
|
# Better memory management
|
|
# Improved multi-core utilization
|
|
# Enhanced performance for caching workloads
|