feat: add backend health checks

This commit is contained in:
Alfredo Di Stasio
2026-06-30 10:53:01 +02:00
parent 86680f71f3
commit 741ed4764d
7 changed files with 43 additions and 2 deletions
+10
View File
@@ -27,6 +27,11 @@ http:
services:
lab-younerd-http:
loadBalancer:
healthCheck:
path: "/"
hostname: "lab.younerd.org"
interval: "10s"
timeout: "3s"
servers:
- url: "http://127.0.0.1:8080"
@@ -43,6 +48,9 @@ tcp:
services:
lab-younerd-tls:
loadBalancer:
healthCheck:
interval: "10s"
timeout: "3s"
servers:
- address: "127.0.0.1:8443"
```
@@ -59,6 +67,8 @@ www.azionelab.org -> 127.0.0.1:9080
Adjust `8080` and `9080` to the local ports where the backend HTTP service is listening. The full HTTP request is forwarded so the backend can handle redirects and ACME challenge paths.
Each backend service includes health checks. TCP checks verify that the TLS port accepts connections; HTTP checks call `/` with the configured hostname and treat successful or redirect responses as healthy.
## Run
Validate the Compose file: