#!/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 docker compose ps exit "$code"