Nuno 6a2ce509c1
feat: add healthcheck (#141)
* feat: add healtcheck app

Signed-off-by: rare-magma <rare-magma@posteo.eu>

* feat: add healthz endpoint

Signed-off-by: rare-magma <rare-magma@posteo.eu>

* ci: add healthcheck directive to dockerfile

Signed-off-by: rare-magma <rare-magma@posteo.eu>

---------

Signed-off-by: rare-magma <rare-magma@posteo.eu>
2024-07-03 14:40:40 -04:00

21 lines
261 B
Go

package main
import (
"fmt"
"log"
"net/http"
"os"
)
func main() {
if len(os.Args) < 2 {
log.Fatal("Expected URL as command-line argument")
os.Exit(1)
}
url := os.Args[1]
fmt.Println(url)
if _, err := http.Get(url); err != nil {
os.Exit(1)
}
}