🔧 chore: Update docker-compose file to use curl for health checks and adjust startup cycles.

This commit is contained in:
jarvis2f 2024-12-27 09:27:04 +08:00
parent 7b830e6e72
commit 0b01b5345d
2 changed files with 3 additions and 3 deletions

View file

@ -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 && \

View file

@ -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}