diff --git a/Dockerfile b/Dockerfile index a16eb958f2..7e3548ddef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,6 +92,7 @@ LABEL org.opencontainers.image.source="https://github.com/Wei-Shaw/sub2api" RUN apk add --no-cache \ ca-certificates \ tzdata \ + curl \ su-exec \ libpq \ zstd-libs \ @@ -130,7 +131,7 @@ EXPOSE 8080 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ - CMD wget -q -T 5 -O /dev/null http://localhost:${SERVER_PORT:-8080}/health || exit 1 + CMD curl -f -s --max-time 5 http://localhost:${SERVER_PORT:-8080}/health || exit 1 # Run the application (entrypoint fixes /app/data ownership then execs as sub2api) ENTRYPOINT ["/app/docker-entrypoint.sh"] diff --git a/Dockerfile.goreleaser b/Dockerfile.goreleaser index f251d154c6..a58e445f9a 100644 --- a/Dockerfile.goreleaser +++ b/Dockerfile.goreleaser @@ -55,7 +55,7 @@ RUN chmod +x /app/docker-entrypoint.sh EXPOSE 8080 HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ - CMD curl -f http://localhost:${SERVER_PORT:-8080}/health || exit 1 + CMD curl -f -s --max-time 5 http://localhost:${SERVER_PORT:-8080}/health || exit 1 # Run the application (entrypoint fixes /app/data ownership then execs as sub2api) ENTRYPOINT ["/app/docker-entrypoint.sh"] diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 7caa5ca63e..e4fa300ae5 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -107,7 +107,7 @@ EXPOSE 8080 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ - CMD wget -q -T 5 -O /dev/null http://localhost:${SERVER_PORT:-8080}/health || exit 1 + CMD curl -f -s --max-time 5 http://localhost:${SERVER_PORT:-8080}/health || exit 1 # Run the application (entrypoint fixes /app/data ownership then execs as sub2api) ENTRYPOINT ["/app/docker-entrypoint.sh"]