feat: 更新健康检查脚本和依赖
Some checks failed
部署后端服务 / 🚀 构建并部署 (push) Has been cancelled

- 将健康检查命令从`/photography-api --health-check`更新为使用新的脚本`/usr/local/bin/health-check.sh`
- 在Dockerfile中添加`wget`作为运行时依赖
- 确保健康检查脚本具有执行权限

此更改提升了健康检查的可靠性和灵活性。
This commit is contained in:
xujiang
2025-07-16 15:02:27 +08:00
parent e5fa256fb0
commit fdf524a172
5 changed files with 22 additions and 8 deletions

12
backend/health-check.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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