From fe1c0d69ff523954cd07922b268061cf3c5ab451 Mon Sep 17 00:00:00 2001 From: danial Date: Sun, 30 Mar 2025 00:36:11 +0800 Subject: [PATCH] fix(deploy): update healthcheck URL to use localhost The healthcheck URL was updated from using the environment variable NGINX_CONFIG_URL to using 127.0.0.1 to ensure the healthcheck works correctly in the local environment. This change avoids potential issues with the environment variable not being properly resolved. --- deploy/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 6810e08..fef4f92 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -28,6 +28,6 @@ RUN sed -i "s#NGINX_CONFIG_URL#${NGINX_CONFIG_URL}#g" /etc/nginx/conf.d/default. RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* # 添加安全检查 -HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl -f http://${NGINX_CONFIG_URL}:12401/api/monitor/heathcheck || exit 1 +HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl -f http://127.0.0.1:12400/api/monitor/heathcheck || exit 1 # CMD ["sed", "-i", "'s#NGINX_CONFIG_URL#${NGINX_CONFIG_URL}#g'", "/etc/nginx/conf.d/default.conf && nginx ", "-g", "'daemon off;'"] EXPOSE 12400 \ No newline at end of file