改进健康检查
This commit is contained in:
parent
aa81a4646a
commit
de66a3ebf9
@ -9,7 +9,7 @@ services:
|
||||
- "./dist:/usr/share/nginx/html:ro"
|
||||
- "./nginx.conf:/etc/nginx/nginx.conf"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
@ -46,6 +46,11 @@ http {
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /health {
|
||||
add_header Content-Type text/plain;
|
||||
return 200 "OK";
|
||||
}
|
||||
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user