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