diff --git a/docker-compose.yml b/docker-compose.yml index f30e4cb..9c9ca09 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,6 +49,9 @@ services: image: confluentinc/cp-zookeeper:7.5.0 container_name: mes-zookeeper restart: always + # Confluent entrypoint 不 exec 且健康检查脚本频繁 fork,僵尸子进程无人回收 + # (服务器实测 137 个);init: true 注入 tini 作为 PID 1 统一回收 + init: true ports: - "2181:2181" environment: @@ -71,6 +74,8 @@ services: image: confluentinc/cp-kafka:7.5.0 container_name: mes-kafka restart: always + # 同上:僵尸进程累积 (服务器实测 1072 个),tini 作为 PID 1 回收 + init: true depends_on: zookeeper: condition: service_healthy diff --git a/mes-auth/Dockerfile b/mes-auth/Dockerfile index e264780..dcabef9 100644 --- a/mes-auth/Dockerfile +++ b/mes-auth/Dockerfile @@ -32,7 +32,7 @@ chmod +x /app/start.sh EXPOSE 8081 -HEALTHCHECK --interval=30s --timeout=3s --retries=3 \ +HEALTHCHECK --interval=60s --timeout=10s --retries=3 --start-period=90s \ CMD curl -sf http://localhost:8081/actuator/health || exit 1 CMD ["/app/start.sh"] diff --git a/mes-dashboard/Dockerfile b/mes-dashboard/Dockerfile index 0f18a6f..57cc663 100644 --- a/mes-dashboard/Dockerfile +++ b/mes-dashboard/Dockerfile @@ -32,7 +32,7 @@ chmod +x /app/start.sh EXPOSE 8085 -HEALTHCHECK --interval=30s --timeout=3s --retries=3 \ +HEALTHCHECK --interval=60s --timeout=10s --retries=3 --start-period=90s \ CMD curl -sf http://localhost:8085/actuator/health || exit 1 CMD ["/app/start.sh"] diff --git a/mes-gateway/Dockerfile b/mes-gateway/Dockerfile index 89d9da6..623234e 100644 --- a/mes-gateway/Dockerfile +++ b/mes-gateway/Dockerfile @@ -32,7 +32,7 @@ chmod +x /app/start.sh EXPOSE 9090 -HEALTHCHECK --interval=30s --timeout=3s --retries=3 \ +HEALTHCHECK --interval=60s --timeout=10s --retries=3 --start-period=90s \ CMD curl -sf http://localhost:9090/actuator/health || exit 1 CMD ["/app/start.sh"] diff --git a/mes-process/Dockerfile b/mes-process/Dockerfile index 04ae1eb..74c5069 100644 --- a/mes-process/Dockerfile +++ b/mes-process/Dockerfile @@ -32,7 +32,7 @@ chmod +x /app/start.sh EXPOSE 8083 -HEALTHCHECK --interval=30s --timeout=3s --retries=3 \ +HEALTHCHECK --interval=60s --timeout=10s --retries=3 --start-period=90s \ CMD curl -sf http://localhost:8083/actuator/health || exit 1 CMD ["/app/start.sh"] diff --git a/mes-quality/Dockerfile b/mes-quality/Dockerfile index 12418db..e0185a0 100644 --- a/mes-quality/Dockerfile +++ b/mes-quality/Dockerfile @@ -32,7 +32,7 @@ chmod +x /app/start.sh EXPOSE 8084 -HEALTHCHECK --interval=30s --timeout=3s --retries=3 \ +HEALTHCHECK --interval=60s --timeout=10s --retries=3 --start-period=90s \ CMD curl -sf http://localhost:8084/actuator/health || exit 1 CMD ["/app/start.sh"] diff --git a/mes-workorder/Dockerfile b/mes-workorder/Dockerfile index 6a9e853..25b9dbd 100644 --- a/mes-workorder/Dockerfile +++ b/mes-workorder/Dockerfile @@ -32,7 +32,7 @@ chmod +x /app/start.sh EXPOSE 8082 -HEALTHCHECK --interval=30s --timeout=3s --retries=3 \ +HEALTHCHECK --interval=60s --timeout=10s --retries=3 --start-period=90s \ CMD curl -sf http://localhost:8082/actuator/health || exit 1 CMD ["/app/start.sh"] diff --git a/pom.xml b/pom.xml index 986eecd..5bb2199 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,6 @@ 0.12.5 2.0.47 1.35.0 - 8.10.0 4.3.1 5.1.4 2.0.0 @@ -122,11 +121,6 @@ influxdb-client-java ${influxdb-client.version} - - co.elastic.clients - elasticsearch-java - ${elasticsearch-java.version} - org.apache.kafka kafka-clients