The Great Open Source Debate with Elastic, Gluu and GitHub 🎤 Oct 26

Fresh docker-compose deployed with warning about depricated MongoDB

I’m trying to set up with docker-compose (in Portainer on Ubuntu 20.04).

By using the compose file linked from the docs I get it running but with a warning about MongoDB:

Is there an updated compose file available that starts with MongoDB 4.2 or what do I need to edit to get 4.2 running?
All I find is guides to upgrade from 4.0 to 4.2 which should not be necessary when starting fresh?

Server Setup Information

  • Version of Rocket.Chat Server: 4.0.1
  • Operating System: Ubuntu 20.01
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 12.22.1 - x64
  • MongoDB Version: 4.0
  • Proxy: No, local
  • Firewalls involved: No

Any additional Information

When I edit the compose file from image: mongo:4.0 to image: mongo:4.2 I get:

MongoServerSelectionError: getaddrinfo EAI_AGAIN mongo,
    at Timeout._onTimeout (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/sdam/topology.js:439:30),
    at listOnTimeout (internal/timers.js:554:17),
    at processTimers (internal/timers.js:497:7) {,
  reason: TopologyDescription {,
    type: 'Single',,
    setName: null,,
    maxSetVersion: null,,
    maxElectionId: null,,
    servers: Map {,
      'mongo:27017' => ServerDescription {,
        address: 'mongo:27017',,
        error: Error: getaddrinfo EAI_AGAIN mongo,
            at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26) {,
          name: 'MongoNetworkError',
        roundTripTime: -1,,
        lastUpdateTime: 878008600,,
        lastWriteDate: null,,
        opTime: null,,
        type: 'Unknown',,
        topologyVersion: undefined,,
        minWireVersion: 0,,
        maxWireVersion: 0,,
        hosts: [],,
        passives: [],,
        arbiters: [],,
        tags: [],
    stale: false,,
    compatible: true,,
    compatibilityError: null,,
    logicalSessionTimeoutMinutes: null,,
    heartbeatFrequencyMS: 10000,,
    localThresholdMS: 15,,
    commonWireVersion: null,
Tried 1 times. Waiting 5 secs...

There is a PR open on updating the compose file - Chore: update compose file by debdutdeb · Pull Request #23426 · RocketChat/Rocket.Chat · GitHub

Oh, I missed that in my searches.
Thank you.