fix: correct environment file references to use /etc/aitbc/.env

 Environment File Correction
- Updated all services to use /etc/aitbc/.env instead of /etc/aitbc/production.env
- Fixed EnvironmentFile paths in all systemd services
- Verified /etc/aitbc/.env exists and contains configuration
- Eliminated references to non-existent production.env

 Service Configuration
- All services now use the correct environment file
- Environment variables properly loaded
- Service startup should be more reliable
- No more missing environment file errors

 Production Structure
- Single environment file: /etc/aitbc/.env
- No duplicate or non-existent environment files
- Clean configuration management
- Proper FHS compliance

🚀 Environment file references corrected!
This commit is contained in:
aitbc
2026-04-02 14:39:26 +02:00
parent c5eaea1364
commit a23f91cd9d
8 changed files with 8 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin
Environment=NODE_ID=aitbc
Environment=BLOCKCHAIN_HTTP_PORT=8005
Environment=PYTHONPATH=/opt/aitbc/services
EnvironmentFile=/etc/aitbc/production.env
EnvironmentFile=/etc/aitbc/.env
# Blockchain HTTP execution
ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/blockchain_http_launcher.py

View File

@@ -11,7 +11,7 @@ WorkingDirectory=/opt/aitbc
Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin
Environment=NODE_ID=aitbc
Environment=PYTHONPATH=/opt/aitbc/services
EnvironmentFile=/etc/aitbc/production.env
EnvironmentFile=/etc/aitbc/.env
# Production execution
ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/blockchain_simple.py

View File

@@ -11,7 +11,7 @@ Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin
Environment=NODE_ID=aitbc
Environment=GPU_MARKETPLACE_PORT=8003
Environment=PYTHONPATH=/opt/aitbc/services
EnvironmentFile=/etc/aitbc/production.env
EnvironmentFile=/etc/aitbc/.env
# Production execution
ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/gpu_marketplace_launcher.py

View File

@@ -13,7 +13,7 @@ Environment=NODE_ID=aitbc
Environment=MARKETPLACE_PORT=8002
Environment=WORKERS=1
Environment=PYTHONPATH=/opt/aitbc/services
EnvironmentFile=/etc/aitbc/production.env
EnvironmentFile=/etc/aitbc/.env
# Production execution
ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/marketplace.py

View File

@@ -10,7 +10,7 @@ WorkingDirectory=/opt/aitbc
Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin
Environment=NODE_ID=aitbc
Environment=PYTHONPATH=/opt/aitbc/services
EnvironmentFile=/etc/aitbc/production.env
EnvironmentFile=/etc/aitbc/.env
# Real mining execution
ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/mining_blockchain.py

View File

@@ -10,7 +10,7 @@ WorkingDirectory=/opt/aitbc
Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin
Environment=NODE_ID=aitbc
Environment=PYTHONPATH=/opt/aitbc/services
EnvironmentFile=/etc/aitbc/production.env
EnvironmentFile=/etc/aitbc/.env
# OpenClaw AI execution
ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/openclaw_ai.py

View File

@@ -10,7 +10,7 @@ WorkingDirectory=/opt/aitbc
Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin
Environment=NODE_ID=aitbc
Environment=PYTHONPATH=/opt/aitbc/services
EnvironmentFile=/etc/aitbc/production.env
EnvironmentFile=/etc/aitbc/.env
# Production monitoring
ExecStart=/opt/aitbc/venv/bin/python -c "import time; import logging; import json; from pathlib import Path; logging.basicConfig(level=logging.INFO); logger = logging.getLogger('production-monitor'); while True: try: blockchain_file = Path('/var/lib/aitbc/data/blockchain/aitbc/blockchain.json'); if blockchain_file.exists(): with open(blockchain_file, 'r') as f: data = json.load(f); logger.info(f'Blockchain: {len(data.get(\"blocks\", []))} blocks'); marketplace_dir = Path('/var/lib/aitbc/data/marketplace'); if marketplace_dir.exists(): listings_file = marketplace_dir / 'gpu_listings.json'; if listings_file.exists(): with open(listings_file, 'r') as f: listings = json.load(f); logger.info(f'Marketplace: {len(listings)} GPU listings'); import psutil; cpu_percent = psutil.cpu_percent(); memory_percent = psutil.virtual_memory().percent; logger.info(f'System: CPU {cpu_percent}%, Memory {memory_percent}%'); time.sleep(30); except Exception as e: logger.error(f'Monitoring error: {e}'); time.sleep(60)"

View File

@@ -11,7 +11,7 @@ Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin
Environment=NODE_ID=aitbc
Environment=REAL_MARKETPLACE_PORT=8009
Environment=PYTHONPATH=/opt/aitbc/services
EnvironmentFile=/etc/aitbc/production.env
EnvironmentFile=/etc/aitbc/.env
# Real marketplace execution
ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/real_marketplace_launcher.py