* Initial plan * Add Source and Copy buttons to ModalMarkdown for note source code view Co-authored-by: RMCampos <2219519+RMCampos@users.noreply.github.com> * feat: add healthcheck do native image --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: RMCampos <2219519+RMCampos@users.noreply.github.com> Co-authored-by: Ricardo Campos <ricardompcampos@gmail.com>
20 lines
324 B
Go
20 lines
324 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
"os"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
client := http.Client{
|
|
Timeout: 5 * time.Second,
|
|
}
|
|
// Use 127.0.0.1 as the healthcheck runs inside the container
|
|
resp, err := client.Get("http://127.0.0.1:8585/health")
|
|
if err != nil || resp.StatusCode != http.StatusOK {
|
|
os.Exit(1)
|
|
}
|
|
os.Exit(0)
|
|
}
|