emqx / emqx

The most scalable open-source MQTT broker for IoT, IIoT, and connected vehicles
https://www.emqx.com/
Other
13.51k stars 2.17k forks source link

Add curl to docker image #13282

Closed lukas-mertens closed 6 days ago

lukas-mertens commented 1 week ago

What would you like to be added or enhanced?

Right now the dockerimage doesn't include curl or wget. I would like to implement the docker compose healthcheck though:

    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:18083/status"]
      interval: 5s
      timeout: 30s
      retries: 5

I made a draft PR of this: https://github.com/emqx/emqx/pull/13281

Why is this needed?

The current situation makes it very hard to implement docker compose healthchecks.

ieQu1 commented 1 week ago

You can just use emqx_ctl status command to the same effect.

lukas-mertens commented 6 days ago

@ieQu1 Good point. That's a solution. Is this documented somewhere? If not: I could change this issue to that

ieQu1 commented 6 days ago

Yes, EMQX CLI is, of course, documented: https://docs.emqx.com/en/emqx/latest/admin/cli.html#status

lukas-mertens commented 6 days ago

No, I meant in the docker compose section, but I just found it. Seems like I wasn't good at googling at my first try. It is documented here: https://docs.emqx.com/en/emqx/latest/deploy/install-docker.html

ieQu1 commented 5 days ago

I see, sorry, I misunderstood your question then.