version: "3.8"
services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:6.9.2
    restart: always
    environment:
      MONGO_URL: "mongodb://mongodb:27017/rocketchat?replicaSet=rs0"
      MONGO_OPLOG_URL: "mongodb://mongodb:27017/local?replicaSet=rs0"
      ROOT_URL: ${ROOT_URL:-http://${ROCKETCHAT_HOST}:${ROCKETCHAT_PORT}}
      PORT: ${ROCKETCHAT_PORT}
      DEPLOY_METHOD: docker
      DEPLOY_PLATFORM:
      REG_TOKEN:
    depends_on:
      - mongodb

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


volumes:
  mongodb_data: { driver: local }
