Files
n8n-guide/health-check.sh
2025-09-11 14:00:33 +08:00

24 lines
550 B
Bash
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.

#!/bin/bash
# n8n指南健康检查脚本
echo "🔍 检查n8n指南服务状态..."
# 检查容器是否运行
if docker-compose ps | grep -q "Up"; then
echo "✅ 容器运行正常"
else
echo "❌ 容器未运行"
exit 1
fi
# 检查端口是否可访问
if curl -s http://localhost:8000 > /dev/null; then
echo "✅ 服务可访问"
echo "📱 访问地址http://localhost:8000"
else
echo "❌ 服务不可访问"
echo "📋 查看日志docker-compose logs"
exit 1
fi
echo "🎉 服务健康检查通过!"