Files
HSAP/scripts/dev_up.sh
Chengfang Lu 7c43b44c57 feat: initial HSAP platform
Huaxu Sentinel Active Safety Platform with embedded algorithm code,
Docker Compose setup, and vendored dataset scaffolds for clone-and-run.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 16:59:59 +08:00

29 lines
930 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 一键启动完整开发环境postgres + redis + platform + worker
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
if [[ ! -f .env ]]; then
cp .env.example .env
echo "已创建 .env默认挂载本仓库大文件数据可设置 AS_WORKSPACE_ROOT"
fi
if ! command -v docker >/dev/null 2>&1; then
echo "未安装 Docker。Ubuntu: sudo apt install docker.io docker-compose-v2"
echo "或: https://docs.docker.com/engine/install/"
exit 1
fi
docker compose up -d --build "$@"
echo ""
echo "服务:"
echo " 平台 UI+API http://127.0.0.1:${AS_PLATFORM_PORT:-8787}"
echo " PostgreSQL localhost:${AS_DB_PORT:-5432}"
echo " Redis localhost:${AS_REDIS_PORT:-6379}"
echo ""
echo "React 热更新: docker compose --profile dev up -d web-dev → :5173"
echo "日志: docker compose logs -f platform worker"
echo "停止: docker compose down"