Files
org-roam/20230607135405-rocket_chat.org
2025-11-05 09:18:11 +01:00

3.2 KiB

rocket-chat

Main text communication programm. Runs as a docker container on the communication server (server-w10). There exists no docker-compose file for the startup because the rocket-chat container in combination with the mongo-db is startted as a stack inside the portainer GUI. The Rocketchat Gui is hosted via the traefik_docker.

docker compose file

 services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest}
    restart: on-failure
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.rocketchat.entrypoints=websecure"
      - "traefik.http.routers.rocketchat.rule=Host(`chat.green-chem.net`)"
      - "traefik.http.routers.rocketchat.tls=true"
      - "traefik.http.routers.rocketchat.tls.certresolver=production"
      - "traefik.http.routers.rocketchat.service=rocketchat"
      - "traefik.http.services.rocketchat.loadbalancer.server.port=3000"
      - "traefik.docker.network=traefik_relay"
      #- "traefik.http.routers.rocketchat.middlewares=default@file"
    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
    networks:
      - chat_relay
      - traefik_relay
  mongodb:
    image: docker.io/bitnami/mongodb:${MONGODB_VERSION:-latest}
    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:
      - chat_relay

volumes:
  mongodb_data:
  
networks:
  traefik_relay:
    external: true
  chat_relay:
    internal: true

Networks

The internal network chat_relay will be created automatically but the external network traefik_relay has to be created beforhand when the traefik reverse proxy is created.