# Mongob Error while running rocketchat service in docker-compose.yml file

**URL:** <https://forums.rocket.chat/t/mongob-error-while-running-rocketchat-service-in-docker-compose-yml-file/15886>\
**Category:** Community Support\
**Created:** [February 2, 2023, 10:23am UTC](https://forums.rocket.chat/t/mongob-error-while-running-rocketchat-service-in-docker-compose-yml-file/15886 "2023-02-02T10:23:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shruti\_v](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@shruti\_v](https://forums.rocket.chat/u/shruti_v)\
**Post date:** [February 2, 2023, 10:23am UTC](https://forums.rocket.chat/t/mongob-error-while-running-rocketchat-service-in-docker-compose-yml-file/15886/1 "2023-02-02T10:23:25Z")

</div>

### Description

Hello Everyone,

I want to use rocket chat using docker and for that, I cloned the repo [GitHub - RocketChat/Docker.Official.Image: Docker hub - community managed image](https://github.com/RocketChat/Docker.Official.Image) and use the compose.yml file of it and I only changed the ROOT URL to my domain name ROOT\_URL: [https://mydomain.com](https://mydomain.com) but while running the compose file using ‘docker-compose up’ command it is giving me some errors.

Here is my docker-compose.yml file:

```auto
rocketchat:
    container_name: rocket-chat
    image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest}
    restart: on-failure
    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: https://mydomain.com
      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}"
    networks:
      - test-network

   mongodb:
    image: docker.io/bitnami/mongodb:${MONGODB_VERSION:-4.4}
    restart: on-failure
    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}
    networks:
      - test-network

```

And the below error I am facing while running compose file

 ![image](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/1/102d6e5c5c02aec18501a5dd070a64b19df090ec.png)

I am stuck on it for the last 2 days but I couldn’t find any solution Any help?

---

<div class="post-metadata">

**Author:** ![Devershi](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@Devershi](https://forums.rocket.chat/u/Devershi)\
**Post date:** [February 3, 2023, 2:29pm UTC](https://forums.rocket.chat/t/mongob-error-while-running-rocketchat-service-in-docker-compose-yml-file/15886/2 "2023-02-03T14:29:46Z")

</div>

Hello, @shruti_v I am having the same problem can someone please provide a solution to this?
