feat: upgrade to production-grade systemd services
✅ Production SystemD Services Upgrade - Upgraded existing services instead of creating new ones - Added production-grade configuration with resource limits - Implemented real database persistence and logging - Added production monitoring and health checks ✅ Upgraded Services - aitbc-blockchain-node.service: Production blockchain with persistence - aitbc-marketplace.service: Production marketplace with real data - aitbc-gpu.service: Production GPU marketplace - aitbc-production-monitor.service: Production monitoring ✅ Production Features - Real database persistence (JSON files in /opt/aitbc/production/data/) - Production logging to /opt/aitbc/production/logs/ - Resource limits (memory, CPU, file handles) - Security hardening (NoNewPrivileges, ProtectSystem) - Automatic restart and recovery - Multi-node deployment (aitbc + aitbc1) ✅ Service Endpoints - aitbc (localhost): Marketplace (8002), GPU Marketplace (8003) - aitbc1 (remote): Marketplace (8004), GPU Marketplace (8005) ✅ Monitoring - SystemD journal integration - Production logs and metrics - Health check endpoints - Resource utilization monitoring 🚀 AITBC now running production-grade systemd services! Real persistence, monitoring, and multi-node deployment operational.
This commit is contained in:
21
production/config/database.py
Normal file
21
production/config/database.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import os
|
||||
import ssl
|
||||
|
||||
# Production Database Configuration
|
||||
DATABASE_CONFIG = {
|
||||
'production': {
|
||||
'url': os.getenv('DATABASE_URL', 'postgresql://aitbc:password@localhost:5432/aitbc_prod'),
|
||||
'pool_size': 20,
|
||||
'max_overflow': 30,
|
||||
'pool_timeout': 30,
|
||||
'pool_recycle': 3600,
|
||||
'ssl_context': ssl.create_default_context()
|
||||
},
|
||||
'redis': {
|
||||
'host': os.getenv('REDIS_HOST', 'localhost'),
|
||||
'port': int(os.getenv('REDIS_PORT', 6379)),
|
||||
'db': int(os.getenv('REDIS_DB', 0)),
|
||||
'password': os.getenv('REDIS_PASSWORD', None),
|
||||
'ssl': os.getenv('REDIS_SSL', 'false').lower() == 'true'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user