diff --git a/Dockerfile b/Dockerfile index 84eecc9..1f9f723 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,8 +25,8 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o cli cmd/cli/main. # Runtime stage FROM alpine:latest -# Install ca-certificates for HTTPS requests -RUN apk --no-cache add ca-certificates tzdata +# Install ca-certificates for HTTPS requests and wget for healthcheck +RUN apk --no-cache add ca-certificates tzdata wget WORKDIR /root/ @@ -40,8 +40,8 @@ COPY --from=builder /app/internal/templates ./internal/templates # Expose port (adjust if needed) EXPOSE 8080 -# Health check -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ +# Health check - give more time for startup +HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1 # Run the server