2
0

fix: healthcheck parameter

This commit is contained in:
zhangsz
2025-02-08 20:08:04 +08:00
parent 2d1d7f6d66
commit 66010e962b
2 changed files with 12 additions and 12 deletions

View File

@@ -17,10 +17,10 @@ services:
environment: environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
healthcheck: healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -u root -p${MYSQL_ROOT_PASSWORD}"] test: ["CMD-SHELL", "mysqladmin", "ping", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
interval: 10s interval: 10s
timeout: 5s timeout: 10s
retries: 5 retries: 5
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}
wfc-redis: wfc-redis:
@@ -37,7 +37,7 @@ services:
- ./redis/data:/opt/wfc/redis/data - ./redis/data:/opt/wfc/redis/data
command: redis-server /opt/wfc/redis/redis.conf command: redis-server /opt/wfc/redis/redis.conf
healthcheck: healthcheck:
test: ["CMD", "redis-cli", "ping"] test: ["CMD-SHELL", "redis-cli", "ping"]
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5

View File

@@ -17,10 +17,10 @@ services:
environment: environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
healthcheck: healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -u root -p${MYSQL_ROOT_PASSWORD}"] test: ["CMD-SHELL", "mysqladmin", "ping", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
interval: 10s interval: 10s
timeout: 5s timeout: 10s
retries: 5 retries: 5
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}
wfc-redis: wfc-redis:
@@ -37,7 +37,7 @@ services:
- ./redis/data:/opt/wfc/redis/data - ./redis/data:/opt/wfc/redis/data
command: redis-server /opt/wfc/redis/redis.conf command: redis-server /opt/wfc/redis/redis.conf
healthcheck: healthcheck:
test: ["CMD", "redis-cli", "ping"] test: ["CMD-SHELL", "redis-cli", "ping"]
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
@@ -77,8 +77,8 @@ services:
healthcheck: healthcheck:
test: ["CMD-SHELL", "curl -f http://${NACOS_SERVER_IP}:${NACOS_SERVER_PORT}/nacos/v1/console/health/liveness || exit 1"] test: ["CMD-SHELL", "curl -f http://${NACOS_SERVER_IP}:${NACOS_SERVER_PORT}/nacos/v1/console/health/liveness || exit 1"]
interval: 30s interval: 30s
timeout: 30s timeout: 10s
retries: 10 retries: 5
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}
wfc-gateway: wfc-gateway:
@@ -111,7 +111,7 @@ services:
healthcheck: healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${GATEWAY_SERVER_PORT}/actuator/health || exit 1"] test: ["CMD-SHELL", "curl -f http://localhost:${GATEWAY_SERVER_PORT}/actuator/health || exit 1"]
interval: 30s interval: 30s
timeout: 30s timeout: 10s
retries: 10 retries: 10
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}
@@ -147,7 +147,7 @@ services:
healthcheck: healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${AUTH_SERVER_PORT}/actuator/health || exit 1"] test: ["CMD-SHELL", "curl -f http://localhost:${AUTH_SERVER_PORT}/actuator/health || exit 1"]
interval: 30s interval: 30s
timeout: 30s timeout: 10s
retries: 10 retries: 10
restart: ${RESTART_OPTION} restart: ${RESTART_OPTION}