diff --git a/Dockerfile b/Dockerfile index d601ed9..ba60d1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,9 @@ RUN npm run build # Production stage FROM nginx:alpine +# Install curl for health checks +RUN apk add --no-cache curl + # Copy custom nginx config COPY nginx.conf /etc/nginx/conf.d/default.conf @@ -27,9 +30,5 @@ COPY --from=builder /app/dist /usr/share/nginx/html # Expose port 7777 EXPOSE 7777 -# Health check -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD wget --no-verbose --tries=1 --spider http://localhost:7777/ || exit 1 - # Start nginx CMD ["nginx", "-g", "daemon off;"] diff --git a/docker-compose.yml b/docker-compose.yml index 73829e7..a194a65 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: labels: - "com.centurylinklabs.watchtower.enable=true" healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:7777/"] + test: ["CMD", "curl", "-f", "http://localhost:7777/"] interval: 30s timeout: 10s retries: 3