Some checks failed
部署后端服务 / 🚀 构建并部署 (push) Has been cancelled
- 将健康检查命令从`/photography-api --health-check`更新为使用新的脚本`/usr/local/bin/health-check.sh` - 在Dockerfile中添加`wget`作为运行时依赖 - 确保健康检查脚本具有执行权限 此更改提升了健康检查的可靠性和灵活性。
12 lines
278 B
Bash
Executable File
12 lines
278 B
Bash
Executable File
#!/bin/sh
|
|
# 健康检查脚本
|
|
# 用于Docker健康检查和Kubernetes探针
|
|
|
|
# 检查健康检查端点
|
|
if wget --no-verbose --tries=1 --spider http://localhost:8080/api/v1/health; then
|
|
echo "Health check passed"
|
|
exit 0
|
|
else
|
|
echo "Health check failed"
|
|
exit 1
|
|
fi |