#!/usr/bin/env bash # COMPATIBILITY_SURFACE: stable # OWNER: ops-team # SEE: docs/legacy-inventory.md#gateway-first-production-example # # Gateway-first production launch script. # This is the current checked-in production example, running the gateway # directly and proxying /ws instead of exposing every split FastAPI service. # For split-service topology, see start-dev.sh and docs/current-architecture.md set -euo pipefail cd /root/code/evotraders export PYTHONPATH=/root/code/evotraders/.pydeps:. export TICKERS="${TICKERS:-AAPL,MSFT,GOOGL,AMZN,NVDA,META,TSLA,AMD,NFLX,AVGO,PLTR,COIN}" # 技能沙盒配置(生产环境建议使用 docker) export SKILL_SANDBOX_MODE="${SKILL_SANDBOX_MODE:-docker}" export SKILL_SANDBOX_IMAGE="${SKILL_SANDBOX_IMAGE:-python:3.11-slim}" export SKILL_SANDBOX_MEMORY_LIMIT="${SKILL_SANDBOX_MEMORY_LIMIT:-512m}" export SKILL_SANDBOX_CPU_LIMIT="${SKILL_SANDBOX_CPU_LIMIT:-1.0}" export SKILL_SANDBOX_NETWORK="${SKILL_SANDBOX_NETWORK:-none}" export SKILL_SANDBOX_TIMEOUT="${SKILL_SANDBOX_TIMEOUT:-60}" # "production" here is an explicit deployment run label, not a required # root-level runtime directory name. exec python3 -m backend.main \ --mode live \ --config-name production \ --host 127.0.0.1 \ --port 8765 \ --trigger-time now \ --poll-interval 15