Files
gsfdc/deploy/check.sh
T
wuzilongandCursor a8e2e741d1 feat(deploy): 在同一台机器上接入继续教育和 Dify
4 核 8G 同时跑协会站点、PlayEdu 和估价智能体,并让门户专家页底色透出页面背景。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-23 14:12:18 +08:00

46 lines
881 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
cd "$(dirname "$0")"
if [[ ! -f .env ]]; then
echo "缺少 .env"
exit 1
fi
set -a
# shellcheck disable=SC1091
source .env
set +a
code=0
echo -n "门户 "
if curl -fsS -o /dev/null -w "%{http_code}\n" -H "Host: ${SITE_DOMAIN}" http://127.0.0.1/; then
true
else
code=1
fi
echo -n "后台 "
if curl -fsS -o /dev/null -w "%{http_code}\n" -H "Host: ${SITE_DOMAIN}" http://127.0.0.1/admin/; then
true
else
code=1
fi
echo -n "接口 "
if curl -fsS -H "Host: ${SITE_DOMAIN}" http://127.0.0.1/api/site/health; then
echo
else
code=1
fi
echo -n "继续教育 "
if curl -fsS -o /dev/null -w "%{http_code}\n" -H "Host: ${EDU_DOMAIN}" http://127.0.0.1/; then
true
else
code=1
fi
echo -n "Dify "
if curl -fsS -o /dev/null -w "%{http_code}\n" -H "Host: ${AI_DOMAIN}" http://127.0.0.1/; then
true
else
code=1
fi
docker compose ps
exit "$code"