fix: update health check command to use wget and fix 404 page handling in nginx configuration
This commit is contained in:
@@ -47,7 +47,7 @@ services:
|
|||||||
- '3000:8080'
|
- '3000:8080'
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'curl', '-f', 'http://localhost:8080']
|
test: ['CMD', 'wget', '--spider', '-q', 'http://localhost:8080']
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
@@ -423,7 +423,7 @@ Image=ghcr.io/alam00000/bentopdf:latest
|
|||||||
ContainerName=bentopdf
|
ContainerName=bentopdf
|
||||||
PublishPort=3000:8080
|
PublishPort=3000:8080
|
||||||
AutoUpdate=registry
|
AutoUpdate=registry
|
||||||
HealthCmd=curl -f http://localhost:8080 || exit 1
|
HealthCmd=wget --spider -q http://localhost:8080 || exit 1
|
||||||
HealthInterval=30s
|
HealthInterval=30s
|
||||||
HealthTimeout=10s
|
HealthTimeout=10s
|
||||||
HealthRetries=3
|
HealthRetries=3
|
||||||
|
|||||||
@@ -99,8 +99,10 @@ http {
|
|||||||
add_header Cache-Control "public, immutable";
|
add_header Cache-Control "public, immutable";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_page 404 /404.html;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ $uri.html /index.html;
|
try_files $uri $uri/ $uri.html =404;
|
||||||
expires 5m;
|
expires 5m;
|
||||||
add_header Cache-Control "public, must-revalidate";
|
add_header Cache-Control "public, must-revalidate";
|
||||||
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
||||||
|
|||||||
Reference in New Issue
Block a user