This commit is contained in:
WJQSERVER 2024-11-08 12:14:04 +08:00
parent 8787c11e06
commit 0ab01a9b83
6 changed files with 21 additions and 6 deletions

View file

@ -1,5 +1,14 @@
# 更新日志
v1.7.1
---
- CHANGE: 更新Go版本至1.23.3
- CHANGE: 更新相关依赖库
- ADD: 对`Proxy`模块进行优化,增加使用`HEAD`方式预获取`Content-Length`
- CHANGE: 将`release``dev`版本的底包切换至`wjqserver/caddy:2.9.0-rc4-alpine`,将`nocache`版本的底包切换至`alpine:latest`
- CHANGE: 对`nocache`版本的`config.toml``init.sh`进行适配性修改
- CHANGE: 加入测试性的故障熔断机制(Failure Circuit Breaker) (nocache版本暂不支持)
24w22b
---
- PRE-RELEASE: 此版本是v1.7.1的预发布版本,请勿在生产环境中使用

View file

@ -1 +1 @@
1.7.0
1.7.1

View file

@ -25,7 +25,7 @@ fi
sleep 30
while [[ true ]]; do
# 健康检查
curl -f http://localhost:8080/api/healthcheck || exit 1
# Failure Circuit Breaker
curl -f -max-time 5 -retry 3 http://localhost:8080/api/healthcheck || exit 1
sleep 120
done

View file

@ -38,6 +38,8 @@ RUN chmod +x /usr/local/bin/init.sh
FROM wjqserver/caddy:2.9.0-rc4-alpine
RUN apk add --no-cache curl
COPY --from=builder /data/www /data/www
COPY --from=builder /data/caddy /data/caddy
COPY --from=builder /data/${APPLICATION} /data/${APPLICATION}

View file

@ -22,6 +22,10 @@ fi
/data/${APPLICATION}/${APPLICATION} -cfg /data/${APPLICATION}/config/config.toml > /data/${APPLICATION}/log/run.log 2>&1 &
while true; do
sleep 1
sleep 30
while [[ true ]]; do
# Failure Circuit Breaker
curl -f -max-time 5 -retry 3 http://localhost:8080/api/healthcheck || exit 1
sleep 120
done

View file

@ -113,6 +113,6 @@ func main() {
if err != nil {
logError("Failed to start server: %v\n", err)
}
defer logger.Close()
fmt.Println("Program Exit")
}