Files
aitbc/scripts/wrappers/aitbc-plugin-wrapper.py
aitbc f5266e3292
All checks were successful
Deploy to Testnet / deploy-testnet (push) Successful in 1m44s
Multi-Node Stress Testing / stress-test (push) Successful in 10s
Cross-Node Transaction Testing / transaction-test (push) Successful in 10s
fix: update plugin and monitoring wrapper paths to examples/stubs
2026-05-13 11:16:20 +02:00

36 lines
878 B
Python

#!/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}/examples/stubs/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)