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
|
# 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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user