yml文件


yml文件

version: '3'
services:
  mongo:
    image: mongo:4.0
    restart: unless-stopped
#    image: mongo:4.1
    ports:
      - 27017:27017
    volumes:
#      - /etc/localtime:/etc/localtime:ro
      - .\data\docker\mongo:/data/db
    command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
    hostname: mongo
    container_name: rocketchat_db
    labels:
      - "traefik.enable=false"

  mongo-init-replica:
    image: mongo:4.0
    command: >
      bash -c
        "for i in `seq 1 30`; do
          mongo mongo/rocketchat --eval \"
            rs.initiate({
              _id: 'rs0',
              members: [ { _id: 0, host: 'localhost:27017' } ]})\" &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 secs...\";
          sleep 5;
        done; (exit $$s)"
    depends_on:
      - mongo

  rocketchat:
    image: rocket.chat:3.0.7
    command: >
      bash -c
        "for i in `seq 1 30`; do
          node main.js &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 secs...\";
          sleep 5;
        done; (exit $$s)"
    restart: unless-stopped
    depends_on:
      - mongo
    ports:
      - 3000:3000
    hostname: rocket.chat_3.0.7
    container_name: rocketchat_ap
    volumes:
#      - /etc/localtime:/etc/localtime:ro
      - .\data\docker\rocketchat:/app/uploads
    environment:
      - PORT=3000
#      - ROOT_URL=http://10.254.164.135:3000/rocketchat
      - ROOT_URL=http://localhost:3000/rocketchat
      - MONGO_URL=mongodb://mongo:27017/meteor
      - MONGO_OPLOG_URL=mongodb://mongo:27017/local
#      - MONGO_URL=mongodb://mongo:27017/rocketchat
#      - MONGO_URL=mongodb://10.254.164.135:27017/rocketchat
      - ADMIN_USERNAME=admin
      - ADMIN_PASS=SALAsala0033
#    labels:
#      - "traefik.backend=rocketchat"
#      - "traefik.frontend.rule=Host: your.domain.tld"
  hubot:
    image: rocketchat/hubot-rocketchat:v1.0.11
    depends_on:
      - rocketchat
    ports:
      - 8080:8080
    container_name: hubot
    restart: unless-stopped
    environment:
#      - ROCKETCHAT_URL=http://10.254.164.135:3000/rocketchat
      - ROCKETCHAT_URL=http://localhost:3000/rocketchat
      - ROCKETCHAT_ROOM=test_room
      - ROCKETCHAT_USER=sala
      - ROCKETCHAT_PASSWORD=bot.bot
      - BOT_NAME=SALA
      - EXTERNAL_SCRIPTS=hubot-seen,hubot-links
    volumes:
#      - /etc/localtime:/etc/localtime:ro
      - .\data\docker\hubot:/home/hubot/scripts
#    extra_hosts:
#      - "dh4.mywizard-aiops.accenture.com:172.22.0.3"
#networks:
#  default:
#    driver: bridge
#    ipam:
#      driver: default
#      config:
#        - subnet: 172.18.0.0/24

文章作者: zelin
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 zelin !
  目录