fix: Replace curl with wget in health checks and add wget to Dockerfiles
All checks were successful
build-and-deploy / filter (push) Successful in 2s
build-and-deploy / build (push) Successful in 1m59s
build-and-deploy / deploy (push) Successful in 10s

- Alpine Linux doesn't include curl by default
- Use wget with --spider flag for health checks
- Add wget installation to all Dockerfiles
- This should resolve container health check failures
This commit is contained in:
2025-07-05 15:43:27 -06:00
parent 58ca3d1e73
commit a0044efb42
4 changed files with 9 additions and 9 deletions

View File

@@ -1,8 +1,8 @@
# Admin Dockerfile - Vue 3 Admin Dashboard # Admin Dockerfile - Vue 3 Admin Dashboard
FROM node:20-alpine FROM node:20-alpine
# Install git for npm dependencies # Install git and wget for npm dependencies and health checks
RUN apk add --no-cache git RUN apk add --no-cache git wget
# Set working directory # Set working directory
WORKDIR /app WORKDIR /app

View File

@@ -1,8 +1,8 @@
# Client Dockerfile - Vue 3 Client UI # Client Dockerfile - Vue 3 Client UI
FROM node:20-alpine FROM node:20-alpine
# Install git for npm dependencies # Install git and wget for npm dependencies and health checks
RUN apk add --no-cache git RUN apk add --no-cache git wget
# Set working directory # Set working directory
WORKDIR /app WORKDIR /app

View File

@@ -14,7 +14,7 @@ services:
- snatchgame-network - snatchgame-network
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:2567/health"] test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:2567/health"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3
@@ -36,7 +36,7 @@ services:
- snatchgame-network - snatchgame-network
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"] test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3
@@ -58,7 +58,7 @@ services:
- snatchgame-network - snatchgame-network
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/health"] test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/health"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3

View File

@@ -1,8 +1,8 @@
# Server Dockerfile - Colyseus Server # Server Dockerfile - Colyseus Server
FROM node:20-alpine FROM node:20-alpine
# Install git for npm dependencies # Install git and wget for npm dependencies and health checks
RUN apk add --no-cache git RUN apk add --no-cache git wget
# Set working directory # Set working directory
WORKDIR /app WORKDIR /app