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

@ -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