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
36 lines
874 B
Python
36 lines
874 B
Python
#!/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)
|