From 1888885ffdf39d52af5878b712d75ecbabe78ad2 Mon Sep 17 00:00:00 2001 From: mifi Date: Fri, 30 Jan 2026 20:52:09 -0300 Subject: [PATCH] Docker tweaks for deployment --- Dockerfile | 4 ++-- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 82cee67..a42d5eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,9 +33,9 @@ RUN chown -R nginx:nginx /usr/share/nginx/html && \ # Expose port 80 EXPOSE 80 -# Health check +# Health check (127.0.0.1 to avoid IPv6 localhost when nginx listens on IPv4 only) HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD wget --quiet --tries=1 --spider http://localhost/ || exit 1 + CMD wget --quiet --tries=1 --spider http://127.0.0.1/ || exit 1 # Run nginx in foreground CMD ["nginx", "-g", "daemon off;"] diff --git a/docker-compose.yml b/docker-compose.yml index b19c1a1..862e870 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: pull_policy: always restart: unless-stopped healthcheck: - test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"] + test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1/"] interval: 30s timeout: 3s start_period: 5s