Centos7 使用Docker安裝rocket.chat聊天工具
下載安裝
#!/bin/sh # # setenforce 0 sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config systemctl stop firewalld && systemctl disable firewalld swapoff -a && echo "swapoff -a" >> /etc/rc.local && chmod +x /etc/rc.local yum install -y wget vim lrzsz telnet net-tools yum install -y yum-utils device-mapper-persistent-data lvm2 yum install -y mkdir -p /etc/docker cat > /etc/docker/daemon.json <<EOF { "registry-mirrors": ["], "exec-opts": ["native.cgroupdriver=cgroupfs"], "data-root": "/data/docker", "storage-driver": "overlay2", "storage-opts":["overlay2.override_kernel_check=true"], "log-driver": "json-file", "log-opts": { "max-size": "100m", "max-file": "10" } } EOF systemctl enable docker && systemctl daemon-reload && systemctl start docker echo "* soft nofile 655360" >> /etc/security/limits.conf echo "* hard nofile 655360" >> /etc/security/limits.conf echo "* soft nproc 655360" >> /etc/security/limits.conf echo "* hard nproc 655360" >> /etc/security/limits.conf echo "* soft memlock unlimited" >> /etc/security/limits.conf echo "* hard memlock unlimited" >> /etc/security/limits.conf echo "DefaultLimitNOFILE=1024000" >> /etc/systemd/system.conf echo "DefaultLimitNPROC=1024000" >> /etc/systemd/system.conf ulimit -Hn yum -y install chrony systemctl enable chronyd.service && systemctl start chronyd.service && systemctl status chronyd.service chronyc sources
yum install epel-release -y yum install docker-compose -y
# 建立並進入工作目錄 mkdir /opt/rocketchat cd /opt/rocketchat # 下載編排檔案 curl -L https://raw.githubusercontent.com/RocketChat/Rocket.Chat/develop/docker-compose.yml -o docker-compose.yml
若下載失敗,可使用下面檔案
version: '2' services: rocketchat: image: ccr.ccs.tencentyun.com/tcb-100024104308-urur/rocket.chat:latest 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 volumes: - ./uploads:/app/uploads environment: - PORT=3000 - ROOT_URL= - MONGO_URL=mongodb://mongo:27017/rocketchat - MONGO_OPLOG_URL=mongodb://mongo:27017/local - REG_TOKEN=${REG_TOKEN} # - MAIL_URL=smtp://smtp.email # - HTTP_PROXY= # - HTTPS_PROXY= depends_on: - mongo ports: - 3000:3000 labels: - "traefik.backend=rocketchat" - "traefik.frontend.rule=Host: your.domain.tld" mongo: image: ccr.ccs.tencentyun.com/tcb-100024104308-urur/mongo:4.0 restart: unless-stopped volumes: - ./data/db:/data/db #- ./data/dump:/dump command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1 labels: - "traefik.enable=false" # this container's job is just run the command to initialize the replica set. # it will run the command and remove himself (it will not stay running) mongo-init-replica: image: ccr.ccs.tencentyun.com/tcb-100024104308-urur/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 #traefik: # image: traefik:latest # restart: unless-stopped # command: > # traefik # --docker # --acme=true # --acme.domains='your.domain.tld' # --acme.email='your@email.tld' # --acme.entrypoint=https # --acme.storagefile=acme.json # --defaultentrypoints=http # --defaultentrypoints=https # --entryPoints='Name:http Address::80 Redirect.EntryPoint:https' # --entryPoints='Name:https Address::443 TLS.Certificates:' # ports: # - 80:80 # - 443:443 # volumes: # - /var/run/docker.sock:/var/run/docker.sock
docker-compose up -d
使用說明
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70003733/viewspace-2870962/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- CentOS7上安裝和使用DockerCentOSDocker
- Ubuntu安裝Rocket.ChatUbuntu
- CentOS7 安裝 dockerCentOSDocker
- centos7安裝dockerCentOSDocker
- Centos7安裝安裝部署dockerCentOSDocker
- centos7 docker 安裝教程CentOSDocker
- centos7快速安裝dockerCentOSDocker
- centOs7安裝最新dockerCentOSDocker
- Centos7上安裝dockerCentOSDocker
- centos7下docker安裝CentOSDocker
- centos7下安裝 dockerCentOSDocker
- Centos7安裝Docker EngineCentOSDocker
- Centos7下安裝DockerCentOSDocker
- Centos7 yum安裝 DockerCentOSDocker
- CentOS7 docker docker-Composer 安裝CentOSDocker
- CentOS7 docker安裝部署教程CentOSDocker
- Docker-CE 安裝(centos7)DockerCentOS
- 在Centos7上安裝DockerCentOSDocker
- docker:安裝centos7映象(六)DockerCentOS
- Centos7下解除安裝dockerCentOSDocker
- CentOS7使用Docker安裝STF安卓裝置管理平臺CentOSDocker安卓
- Centos7 安裝 Docker 詳細教程CentOSDocker
- Centos7編譯安裝Docker教程。CentOS編譯Docker
- centos7 安裝docker-composeCentOSDocker
- Centos7安裝docker倉庫HarborCentOSDocker
- centos7安裝docker詳細教程CentOSDocker
- Docker架構及在Centos7上安裝dockerDocker架構CentOS
- CentOS7利用docker安裝MySQL5.7CentOSDockerMySql
- CentOS7安裝Docker並配置映象加速CentOSDocker
- CentOS7下安裝Docker-ComposeCentOSDocker
- docker安裝使用Docker
- Linux(Centos7)安裝Docker 社群(ce)版LinuxCentOSDocker
- 部署企業內部聊天工具Rocket.Chat開源IM系統
- 使用docker安裝nginxDockerNginx
- Docker安裝及使用Docker
- docker安裝和使用Docker
- Docker安裝與使用Docker
- centos7中使用yum安裝NGINX安裝CentOSNginx