Rocket.Chat on Docker - no health check

Description

Hello. We have been running Rocket.Chat v2.0.0. in docker containers since sometime last year. I recently loaded v3.6.2 into our development swarm and the upgrade was easy and worked. The system is stable and functioning as expected.

However, we lost the ability to perform health checks on the container, because this docker image no longer includes curl and our previous health check was relied on curl like this:

test: [“CMD”, “curl”, “localhost:3000/api/info”]

Was this an oversight when building the image? If not, how would you suggest I now construct an appropriate health check?

Thanks for taking a look.

Bryan

Server Setup Information

  • Version of Rocket.Chat Server: 3.6.2
  • Operating System: Linux Ubuntu 18.04 LTS
  • Deployment Method: 3.6.2 docker image
  • Number of Running Instances: ~90
  • DB Replicaset Oplog: enabled
  • NodeJS Version: 12.16.1
  • MongoDB Version: 4.0.4
  • Proxy: traefik

Hello, Bryan

Did you manage to resolve this issue?

do you use Mongo replication? for those ~90 instances of yours?

Can’t you just query the instance externally with the API?

Perhaps I am missing something!!

I have a feeling people also use these:

Ahhhh and also this:

There is no curl in the image but there is node.js.
This is working for me:

    healthcheck:
      test: ["CMD", "node", "--eval", "const http = require('http'); const options = {host: '0.0.0.0', port: 1990, timeout: 2000, path:'/health'}; const healthCheck = http.request(options, (res) => {console.log('HEALTHCHECK STATUS:', res.statusCode); if (res.statusCode == 200) {process.exit(0);} else {process.exit(1);}}); healthCheck.on('error', function (err) {console.error('ERROR'); process.exit(1);}); healthCheck.end();"]