diff --git a/Dockerfile.test b/Dockerfile.test index 1aaddbb..8dd588c 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -32,14 +32,10 @@ RUN echo '{"status":"healthy"}' > /usr/share/nginx/html/health # 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 + sed -i '/location \/ {/a\ + location = /health {\ + default_type application/json;\ + }' /etc/nginx/conf.d/default.conf # Expose port 8000 (same as base image) EXPOSE 8000