From 0bf33ccd5b148eab061144af74b2b0e66f5892fc Mon Sep 17 00:00:00 2001 From: alam00000 Date: Mon, 23 Mar 2026 19:01:29 +0530 Subject: [PATCH] fix: update health check command to use wget and fix 404 page handling in nginx configuration --- docs/self-hosting/docker.md | 4 ++-- nginx.conf | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/self-hosting/docker.md b/docs/self-hosting/docker.md index e1c58d4..2e3d2f4 100644 --- a/docs/self-hosting/docker.md +++ b/docs/self-hosting/docker.md @@ -47,7 +47,7 @@ services: - '3000:8080' restart: unless-stopped healthcheck: - test: ['CMD', 'curl', '-f', 'http://localhost:8080'] + test: ['CMD', 'wget', '--spider', '-q', 'http://localhost:8080'] interval: 30s timeout: 10s retries: 3 @@ -423,7 +423,7 @@ Image=ghcr.io/alam00000/bentopdf:latest ContainerName=bentopdf PublishPort=3000:8080 AutoUpdate=registry -HealthCmd=curl -f http://localhost:8080 || exit 1 +HealthCmd=wget --spider -q http://localhost:8080 || exit 1 HealthInterval=30s HealthTimeout=10s HealthRetries=3 diff --git a/nginx.conf b/nginx.conf index 09b37bd..d22a0d9 100644 --- a/nginx.conf +++ b/nginx.conf @@ -99,8 +99,10 @@ http { add_header Cache-Control "public, immutable"; } + error_page 404 /404.html; + location / { - try_files $uri $uri/ $uri.html /index.html; + try_files $uri $uri/ $uri.html =404; expires 5m; add_header Cache-Control "public, must-revalidate"; add_header Cross-Origin-Embedder-Policy "require-corp" always;