From 0b01b5345d40d4a486a0e8c82344bace2bb00f76 Mon Sep 17 00:00:00 2001 From: jarvis2f <137974272+jarvis2f@users.noreply.github.com> Date: Fri, 27 Dec 2024 09:27:04 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore:=20Update=20docker-compose?= =?UTF-8?q?=20file=20to=20use=20curl=20for=20health=20checks=20and=20adjus?= =?UTF-8?q?t=20startup=20cycles.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- docker-compose.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c58a48..ca284ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,7 @@ FROM node:21-slim AS final WORKDIR /app RUN npm install pm2 -g \ - && apt-get update && apt-get install -y --no-install-recommends nginx wget unzip \ + && apt-get update && apt-get install -y --no-install-recommends nginx wget curl unzip \ && if [ "$(uname -m)" = "x86_64" ]; then \ wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb && \ dpkg -i libssl1.1_1.1.1f-1ubuntu2.23_amd64.deb && \ diff --git a/docker-compose.yaml b/docker-compose.yaml index 580ff1a..dae2656 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,11 +4,11 @@ services: image: ghcr.io/jarvis2f/telegram-files:latest restart: always healthcheck: - test: [ "CMD", "wget", "--spider", "--quiet", "--timeout=3", "--tries=1", "http://localhost:8080/health" ] + test: [ "CMD", "curl", "-f", "http://127.0.0.1/api/health" ] interval: 30s retries: 3 timeout: 10s - start_period: 5s + start_period: 30s environment: APP_ENV: ${APP_ENV:-prod} APP_ROOT: ${APP_ROOT:-/app/data}