dunglas / mercure

🪽 An open, easy, fast, reliable and battery-efficient solution for real-time communications
https://mercure.rocks
GNU Affero General Public License v3.0
3.98k stars 297 forks source link

docs: replace curl with wget in healthcheck example #955

Closed damienfern closed 1 month ago

damienfern commented 1 month ago

mercure:v0.16.3 does not provide curl utility so the healthcheck config in doc won't work. Luckly, wget is installed and can be used instead.

Example command : docker run --rm --health-cmd "curl https://localhost/healthz" -e MERCURE_PUBLISHER_JWT_KEY='!ChangeThisMercureHubJWTSecretKey!' -e MERCURE_SUBSCRIBER_JWT_KEY='!ChangeThisMercureHubJWTSecretKey!' --name health-mercure dunglas/mercure:v0.16.3

Healthcheck status : docker inspect health-mercure


{
// ...
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 198683,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2024-09-30T08:59:48.603645337Z",
            "FinishedAt": "0001-01-01T00:00:00Z",
            "Health": {
                "Status": "starting",
                "FailingStreak": 2,
                "Log": [
                    {
                        "Start": "2024-09-30T11:00:18.727767037+02:00",
                        "End": "2024-09-30T11:00:18.784756446+02:00",
                        "ExitCode": 127,
                        "Output": "/bin/sh: curl: not found\n"
                    },
                    {
                        "Start": "2024-09-30T11:00:48.794090367+02:00",
                        "End": "2024-09-30T11:00:48.842858301+02:00",
                        "ExitCode": 127,
                        "Output": "/bin/sh: curl: not found\n"
                    }
                ]
            }
        },
// ...
}
CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.

dunglas commented 1 month ago

Thanks!