fix: Replace curl with wget in health checks and add wget to Dockerfiles
- 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:
@@ -1,8 +1,8 @@
|
||||
# Admin Dockerfile - Vue 3 Admin Dashboard
|
||||
FROM node:20-alpine
|
||||
|
||||
# Install git for npm dependencies
|
||||
RUN apk add --no-cache git
|
||||
# Install git and wget for npm dependencies and health checks
|
||||
RUN apk add --no-cache git wget
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Client Dockerfile - Vue 3 Client UI
|
||||
FROM node:20-alpine
|
||||
|
||||
# Install git for npm dependencies
|
||||
RUN apk add --no-cache git
|
||||
# Install git and wget for npm dependencies and health checks
|
||||
RUN apk add --no-cache git wget
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
@@ -14,7 +14,7 @@ services:
|
||||
- snatchgame-network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:2567/health"]
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:2567/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -36,7 +36,7 @@ services:
|
||||
- snatchgame-network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -58,7 +58,7 @@ services:
|
||||
- snatchgame-network
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3001/health"]
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Server Dockerfile - Colyseus Server
|
||||
FROM node:20-alpine
|
||||
|
||||
# Install git for npm dependencies
|
||||
RUN apk add --no-cache git
|
||||
# Install git and wget for npm dependencies and health checks
|
||||
RUN apk add --no-cache git wget
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
Reference in New Issue
Block a user