From c0940d1938b9277daf3596c701bb1bedf57a22a4 Mon Sep 17 00:00:00 2001 From: John Ajera <37360952+jajera@users.noreply.github.com> Date: Sat, 15 Nov 2025 20:34:50 +0000 Subject: [PATCH] fix: update test image health endpoint ensures the the health endpoint is directly accessible in browser without being downloaded --- Dockerfile.test | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile.test b/Dockerfile.test index 6ae003a..1aaddbb 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -30,8 +30,16 @@ COPY --from=builder /docs/site /usr/share/nginx/html # Create health check endpoint RUN echo '{"status":"healthy"}' > /usr/share/nginx/html/health -# Configure nginx to listen on port 8000 -RUN sed -i 's/listen 80;/listen 8000;/' /etc/nginx/conf.d/default.conf +# Configure nginx to listen on port 8000 and set Content-Type for /health +RUN sed -i 's/listen 80;/listen 8000;/' /etc/nginx/conf.d/default.conf && \ + cat >> /etc/nginx/conf.d/default.conf << 'EOF' + + # Health check endpoint with proper Content-Type + location = /health { + default_type application/json; + add_header Content-Type application/json; + } +EOF # Expose port 8000 (same as base image) EXPOSE 8000