I am having trouble to connect remote mongodb (TLS)

What i am trying to accomplish:

Setup Rocket.Chat container with docker-compose and connect Rocket.Chat with a manged secure MongoDB instance running on DigitalOcean.

I have found helpfull docs at: High Availability - Rocket.Chat Docs

This docs is perfect, but I need to make a secure connection with TLS.

My docker-compose environment for Rocket.Chat looks like:

 environment:
      - PORT=3000
      - ROOT_URL=https://localhost:3000/
      - MONGO_URL=mongodb+srv://rocketchat_user:<password>@<mongodb-server-address>/rocketchat_db?authSource=admin&replicaSet=rs0&w=majority&tls=true&tlsCAFile=<cert-path>
      - MONGO_OPLOG_URL=mongodb+srv://rocketchat_user:<password>@<mongodb-server-address>/local?authSource=admin&replicaSet=rs0&tls=true&tlsCAFile=<cert-path>

Server Setup Information

  • Version of Rocket.Chat Server: 4.4.1
  • Host Operating System: Ubuntu 20 LTS
  • Deployment Method: Docker Compose

MongoDB Information

  • MongoDB Version: 4.4
  • Protocol: mongodb+srv
  • TLS: True
  • Provider: DigitalOcean

Any help will be highly appreciated, Thanks !