Cannot get Rocket Chat dockerized to work

Description

I am trying to install Rocket Chat via Portainer, but cannot access the container.

docker compose:

volumes:
  mongodb_data: { driver: local }

services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest}
    restart: always
    #labels:
    #  traefik.enable: "true"
    #  traefik.http.routers.rocketchat.rule: Host(`${DOMAIN}`)
    #  traefik.http.routers.rocketchat.tls: "true"
    #  traefik.http.routers.rocketchat.entrypoints: https
    #  traefik.http.routers.rocketchat.tls.certresolver: le
    environment:
      MONGO_URL: "${MONGO_URL:-\
        mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
        ${MONGODB_DATABASE:-rocketchat}?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
      MONGO_OPLOG_URL: "${MONGO_OPLOG_URL:\
        -mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
        local?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
      ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT:-3000}}
      PORT: ${PORT:-3000}
      DEPLOY_METHOD: docker
      DEPLOY_PLATFORM: ${DEPLOY_PLATFORM}
    depends_on:
      - mongodb
    expose:
      - ${PORT:-3000}
    ports:
      - "${BIND_IP:-0.0.0.0}:${HOST_PORT:-3000}:${PORT:-3000}"

  mongodb:
    image: docker.io/bitnami/mongodb:${MONGODB_VERSION:-5.0}
    restart: always
    volumes:
      - mongodb_data:/bitnami/mongodb
    environment:
      MONGODB_REPLICA_SET_MODE: primary
      MONGODB_REPLICA_SET_NAME: ${MONGODB_REPLICA_SET_NAME:-rs0}
      MONGODB_PORT_NUMBER: ${MONGODB_PORT_NUMBER:-27017}
      MONGODB_INITIAL_PRIMARY_HOST: ${MONGODB_INITIAL_PRIMARY_HOST:-mongodb}
      MONGODB_INITIAL_PRIMARY_PORT_NUMBER: ${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}
      MONGODB_ADVERTISED_HOSTNAME: ${MONGODB_ADVERTISED_HOSTNAME:-mongodb}
      MONGODB_ENABLE_JOURNAL: ${MONGODB_ENABLE_JOURNAL:-true}
      ALLOW_EMPTY_PASSWORD: ${ALLOW_EMPTY_PASSWORD:-yes}

with ENV:

RELEASE=6.0.1
ROOT_URL=http://my.ip

The docker logs show this error:

/app/bundle/programs/server/node_modules/fibers/future.js:313
                                                throw(ex);
                                                ^
errorClass [Error]: [An error occurred when creating an index for collection "users: connect ECONNREFUSED 172.27.0.2:27017]
    at Collection.createIndex (packages/mongo/collection.js:801:15)
    at setupUsersCollection (packages/accounts-base/accounts_server.js:1776:9)
    at new AccountsServer (packages/accounts-base/accounts_server.js:75:5)
    at packages/accounts-base/server_main.js:7:12
    at module (packages/accounts-base/server_main.js:19:31)
    at fileEvaluate (packages/modules-runtime.js:336:7)
    at Module.require (packages/modules-runtime.js:238:14)
    at require (packages/modules-runtime.js:258:21)
    at /app/bundle/programs/server/packages/accounts-base.js:2192:15
    at /app/bundle/programs/server/packages/accounts-base.js:2199:3
    at /app/bundle/programs/server/boot.js:369:38
    at Array.forEach (<anonymous>)
    at /app/bundle/programs/server/boot.js:210:21
    at /app/bundle/programs/server/boot.js:423:7
    at Function.run (/app/bundle/programs/server/profile.js:256:14)
    at /app/bundle/programs/server/boot.js:422:13 {
  isClientSafe: true,
  error: 'An error occurred when creating an index for collection "users: connect ECONNREFUSED 172.27.0.2:27017',
  reason: undefined,
  details: undefined,
  errorType: 'Meteor.Error'
}

I am Running Ubuntu 20.04 with UFW (ports 3000 and 27017 are enabled).

What could be the issue?