Update RC Docker - error a route URL prefix must begin with a slash

Hello,

we run at the moment RC Version 4.8.6 with the following details and we want to update to 5.4.9

  • Version of Rocket.Chat Server: 4.8.6
  • Operating System: Ubuntu
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v14.18.3
  • MongoDB Version: 5.0.5 / wiredTiger (oplog Aktiviert)
  • Proxy: nginx
  • Firewalls involved: yes but configured correctly

At the moment we have a docker-compose.yml file that looks like that. There is some code in this file for the wiredtiger migration and we did not cleanup the file:

version: '2'

services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:4.8.6
    command: >
      bash -c
        "for (( ; ; )); do
          node main.js &&
          s=$$? && break || s=$$?;
          echo \"Could not start Rocket.Chat. Waiting 5 secs...\";
          sleep 5;
        done; (exit $$s)"
    restart: unless-stopped
    volumes:
      - /var/uploads:/app/uploads
    environment:
      - PORT=3000
      - ROOT_URL=https://chat.our.domain.com
      - MONGO_URL=mongodb://mongo:27017/rocketchat
      - MONGO_OPLOG_URL=mongodb://mongo:27017/local
      - MAIL_URL=smtp://smtp.email
    depends_on:
      - mongo
    ports:
      - 3000:3000
    labels:
      - "traefik.backend=rocketchat"
      - "traefik.frontend.rule=Host: your.domain.tld"

  mongo:
    image: mongo:5.0
    restart: unless-stopped
    volumes:
      - ./data/db:/data/db
      - ./data/dump:/dump
    command: >
      bash -c
        "while [ ! -f /data/db/WiredTiger ]; do
          echo \"wiredTiger migration hasn't started yet. Waiting 30 secs...\";
          sleep 30;
        done;
        docker-entrypoint.sh mongod --oplogSize 128 --replSet rs0 --storageEngine=wiredTiger;"
    depends_on:
      - migrator
    labels:
      - "traefik.enable=false"

  migrator:
    build: ./docker/
    volumes:
      - ./data/db:/data/db

  mongo-init-replica:
    image: mongo:5.0
    command: >
      bash -c
        "for (( ; ; )); do
          mongo mongo/rocketchat --eval \"
            rs.initiate({
              _id: 'rs0',
              members: [ { _id: 0, host: 'localhost:27017' } ]})\" &&
          s=$$? && break || s=$$?;
          echo \"Could not reach MongoDB. Waiting 5 secs ...\";
          sleep 5;
        done; (exit $$s)"
    depends_on:
      - mongo

For the update to 5.4.9 i changed the docker-compose.yml file and created a .env for the variables.

The new yml file looks like that ( i changed mongodb to mongo because our mongo instance is called mongo and not mongodb - iā€™m not sure if this make the problem or should i rename the existing mongo instance to mongodb?

volumes:
  mongo_data: { driver: local }

services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest}
    restart: always
    labels:
      traefik.enable: "false"
      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
      volumes:
      - /var/uploads:/app/uploads
    environment:
      MONGO_URL: "${MONGO_URL:-\
        mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongo}:${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:-mongo}:${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:-}
      REG_TOKEN: ${REG_TOKEN:-}
    depends_on:
      - mongo
    expose:
      - ${PORT:-3000}
    ports:
      - "${BIND_IP:-0.0.0.0}:${HOST_PORT:-3000}:${PORT:-3000}"

  mongo:
    image: mongo:5.0
    restart: always
    volumes:
      - ./data/db:/data/db
      - ./data/dump:/dump
    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:-mongo}
      MONGODB_INITIAL_PRIMARY_PORT_NUMBER: ${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}
      MONGODB_ADVERTISED_HOSTNAME: ${MONGODB_ADVERTISED_HOSTNAME:-mongo}
      MONGODB_ENABLE_JOURNAL: ${MONGODB_ENABLE_JOURNAL:-true}
      ALLOW_EMPTY_PASSWORD: ${ALLOW_EMPTY_PASSWORD:-yes}

The .env file looks like that

### Rocket.Chat configuration

# Rocket.Chat version
# see:- https://github.com/RocketChat/Rocket.Chat/releases
#RELEASE=5.4.9
# MongoDB endpoint (include ?replicaSet= parameter)
MONGO_URL=mongodb://mongo:27017/rocketchat
# MongoDB endpoint to the local database
MONGO_OPLOG_URL=mongodb://mongo:27017/local
# IP to bind the process to
BIND_IP=xxx.xxx.xxx.xxx
# URL used to access your Rocket.Chat instance
ROOT_URL=https://chat.our.domain.com
# Port Rocket.Chat runs on (in-container)
#PORT=3000
# Port on the host to bind to
#HOST_PORT=

### MongoDB configuration
# MongoDB version/image tag
#MONGODB_VERSION=
# See:- https://hub.docker.com/r/bitnami/mongodb

### Traefik config (if enabled)
# Traefik version/image tag
#TRAEFIK_RELEASE=
# Domain for https (change ROOT_URL & BIND_IP accordingly)
#DOMAIN=
# Email for certificate notifications
#LETSENCRYPT_EMAIL=

But if i start the docker i get in the logs allways the error
a route URL prefix must begin with a slash

What did i wrong?
It would be very great if someone can help me.
Thanks