RocketChat

edit
chat.hozzae.com ↗
Client
hozzae
Server
vps3296234 163.245.217.101
Port · Service
3000 · docker-compose
Rate
All checks passed · nginx Apr 15 · service Apr 15
Nginx
server {
    listen 443 ssl;
    server_name chat.hozzae.com;

    ssl_certificate /etc/letsencrypt/live/chat.hozzae.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/chat.hozzae.com/privkey.pem;

    location / {
        proxy_pass http://rocketchat;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Nginx-Proxy true;
        proxy_redirect off;
    }
}
cat /etc/nginx/sites-available/chat.hozzae.com
or
Service Config
volumes:
  mongodb_data: { driver: local }

services:
  rocketchat:
    image: ${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
      DEPRECATED_COMPOSE: "${DEPRECATED_COMPOSE_ACK:?This compose file is deprecated, please migrate to https://github.com/RocketChat/rocketchat-compose}"
    environment:
      MONGO_URL: mongodb://mongodb:27017/rocketchat?replicaSet=rs0
      ROOT_URL: ${ROOT_URL:-http://localhost:3000}
      PORT: ${PORT:-3000}
      DEPLOY_METHOD: docker
      DEPLOY_PLATFORM: ${DEPLOY_PLATFORM:-}
      REG_TOKEN: ${REG_TOKEN:-}
    depends_on:
      - mongodb
    expose:
      - ${PORT:-3000}
    ports:
      - "${BIND_IP:-0.0.0.0}:${HOST_PORT:-3000}:${PORT:-3000}"

  mongodb:
    image: mongodb/mongodb-community-server:${MONGODB_VERSION:-8.2}-ubi8
    restart: on-failure
    environment:
      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}
    entrypoint: |
      bash -c
        "mongod --replSet $$MONGODB_REPLICA_SET_NAME --bind_ip_all &
          sleep 2;
          until mongosh --eval \"db.adminCommand('ping')\"; do
            echo '=====> Waiting for Mongo...';
            sleep 1;
          done;
          echo \"=====> Initiating ReplSet $$MONGODB_REPLICA_SET_NAME at $$MONGODB_INITIAL_PRIMARY_HOST:$$MONGODB_PORT_NUMBER...\";
          mongosh --eval \"rs.initiate({_id: '$$MONGODB_REPLICA_SET_NAME', members: [{ _id: 0, host: '$$MONGODB_INITIAL_PRIMARY_HOST:$$MONGODB_PORT_NUMBER' }]})\";
          echo '=====> Initiating ReplSet done...';
        wait"
cat /etc/systemd/system/docker-compose.service
or