Add Ubuntu deployment workflow

This commit is contained in:
武阳
2026-05-07 11:50:50 +08:00
parent 2349075a82
commit 37f411a547
11 changed files with 565 additions and 883 deletions
+10 -1
View File
@@ -8,6 +8,11 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
RUN_DIR="${ROOT_DIR}/.port_sessions"
ENV_FILE="${ROOT_DIR}/.env.deploy"
if [[ -f "${ENV_FILE}" ]]; then
# shellcheck disable=SC1090
source "${ENV_FILE}"
fi
BACKEND_HOST="${CLAW_BACKEND_HOST:-0.0.0.0}"
BACKEND_PORT="${CLAW_BACKEND_PORT:-8765}"
FRONTEND_HOST="${CLAW_FRONTEND_HOST:-0.0.0.0}"
@@ -129,7 +134,11 @@ stop_pid_file "${RUN_DIR}/webui-backend.pid" "backend"
stop_port_listener "${FRONTEND_PORT}" "frontend"
stop_port_listener "${BACKEND_PORT}" "backend"
export OPENAI_API_KEY="${OPENAI_API_KEY:-sk-Jxoh5lf1jWg6HQZYYyfyagXudGxUXNAgkZklxMnnXHn7pFmU}"
if [[ -z "${OPENAI_API_KEY:-}" ]]; then
echo "OPENAI_API_KEY is not configured." >&2
echo "Run scripts/deploy-ubuntu.sh once, or create ${ENV_FILE} from .env.deploy.example." >&2
fi
export OPENAI_API_KEY="${OPENAI_API_KEY:-}"
export OPENAI_BASE_URL="${OPENAI_BASE_URL:-http://model.mify.ai.srv/v1}"
export OPENAI_MODEL="${OPENAI_MODEL:-xiaomi/mimo-v2-flash}"