✅ 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.
22 lines
661 B
Python
22 lines
661 B
Python
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'
|
|
}
|
|
}
|