fix: update ai-service module path in systemd service
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Systemd Sync / sync-systemd (push) Successful in 20s
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Systemd Sync / sync-systemd (push) Successful in 20s
- Change ExecStart from src.app:app to src.ai_service.main:app in aitbc-ai.service
This commit is contained in:
35
scripts/wrappers/aitbc-monitoring-wrapper.py
Normal file
35
scripts/wrappers/aitbc-monitoring-wrapper.py
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Wrapper script for aitbc-monitoring service
|
||||
Uses centralized aitbc utilities for path configuration
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Add aitbc to path
|
||||
sys.path.insert(0, str(Path("/opt/aitbc")))
|
||||
sys.path.insert(0, str(Path("/opt/aitbc/aitbc")))
|
||||
|
||||
from aitbc import ENV_FILE, NODE_ENV_FILE, REPO_DIR, DATA_DIR, LOG_DIR
|
||||
|
||||
# Set up environment using aitbc constants
|
||||
os.environ["AITBC_ENV_FILE"] = str(ENV_FILE)
|
||||
os.environ["AITBC_NODE_ENV_FILE"] = str(NODE_ENV_FILE)
|
||||
os.environ["PYTHONPATH"] = f"{REPO_DIR}/apps/monitoring-service/src"
|
||||
os.environ["DATA_DIR"] = str(DATA_DIR)
|
||||
os.environ["LOG_DIR"] = str(LOG_DIR)
|
||||
|
||||
# Execute the actual service
|
||||
exec_cmd = [
|
||||
"/opt/aitbc/venv/bin/python",
|
||||
"-m",
|
||||
"uvicorn",
|
||||
"monitoring_service.main:app",
|
||||
"--host",
|
||||
"0.0.0.0",
|
||||
"--port",
|
||||
"8002"
|
||||
]
|
||||
os.execvp(exec_cmd[0], exec_cmd)
|
||||
35
scripts/wrappers/aitbc-openclaw-wrapper.py
Normal file
35
scripts/wrappers/aitbc-openclaw-wrapper.py
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Wrapper script for aitbc-openclaw service
|
||||
Uses centralized aitbc utilities for path configuration
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Add aitbc to path
|
||||
sys.path.insert(0, str(Path("/opt/aitbc")))
|
||||
sys.path.insert(0, str(Path("/opt/aitbc/aitbc")))
|
||||
|
||||
from aitbc import ENV_FILE, NODE_ENV_FILE, REPO_DIR, DATA_DIR, LOG_DIR
|
||||
|
||||
# Set up environment using aitbc constants
|
||||
os.environ["AITBC_ENV_FILE"] = str(ENV_FILE)
|
||||
os.environ["AITBC_NODE_ENV_FILE"] = str(NODE_ENV_FILE)
|
||||
os.environ["PYTHONPATH"] = f"{REPO_DIR}/apps/openclaw-service/src"
|
||||
os.environ["DATA_DIR"] = str(DATA_DIR)
|
||||
os.environ["LOG_DIR"] = str(LOG_DIR)
|
||||
|
||||
# Execute the actual service
|
||||
exec_cmd = [
|
||||
"/opt/aitbc/venv/bin/python",
|
||||
"-m",
|
||||
"uvicorn",
|
||||
"openclaw_service.main:app",
|
||||
"--host",
|
||||
"0.0.0.0",
|
||||
"--port",
|
||||
"8014"
|
||||
]
|
||||
os.execvp(exec_cmd[0], exec_cmd)
|
||||
35
scripts/wrappers/aitbc-plugin-wrapper.py
Normal file
35
scripts/wrappers/aitbc-plugin-wrapper.py
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Wrapper script for aitbc-plugin service
|
||||
Uses centralized aitbc utilities for path configuration
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Add aitbc to path
|
||||
sys.path.insert(0, str(Path("/opt/aitbc")))
|
||||
sys.path.insert(0, str(Path("/opt/aitbc/aitbc")))
|
||||
|
||||
from aitbc import ENV_FILE, NODE_ENV_FILE, REPO_DIR, DATA_DIR, LOG_DIR
|
||||
|
||||
# Set up environment using aitbc constants
|
||||
os.environ["AITBC_ENV_FILE"] = str(ENV_FILE)
|
||||
os.environ["AITBC_NODE_ENV_FILE"] = str(NODE_ENV_FILE)
|
||||
os.environ["PYTHONPATH"] = f"{REPO_DIR}/apps/plugin-service/src"
|
||||
os.environ["DATA_DIR"] = str(DATA_DIR)
|
||||
os.environ["LOG_DIR"] = str(LOG_DIR)
|
||||
|
||||
# Execute the actual service
|
||||
exec_cmd = [
|
||||
"/opt/aitbc/venv/bin/python",
|
||||
"-m",
|
||||
"uvicorn",
|
||||
"plugin_service.main:app",
|
||||
"--host",
|
||||
"0.0.0.0",
|
||||
"--port",
|
||||
"8016"
|
||||
]
|
||||
os.execvp(exec_cmd[0], exec_cmd)
|
||||
@@ -10,7 +10,7 @@ WorkingDirectory=/opt/aitbc/apps/ai-service
|
||||
Environment="PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
EnvironmentFile=/etc/aitbc/.env
|
||||
EnvironmentFile=/etc/aitbc/node.env
|
||||
ExecStart=/opt/aitbc/venv/bin/python -m uvicorn src.app:app --host 0.0.0.0 --port 8005
|
||||
ExecStart=/opt/aitbc/venv/bin/python -m uvicorn src.ai_service.main:app --host 0.0.0.0 --port 8005
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
|
||||
Reference in New Issue
Block a user