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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Ubuntu安裝Rocket.ChatUbuntu
- CentOS7上安裝和使用DockerCentOSDocker
- Centos7安裝安裝部署dockerCentOSDocker
- CentOS7 安裝 dockerCentOSDocker
- centos7安裝dockerCentOSDocker
- CentOS7 docker docker-Composer 安裝CentOSDocker
- CentOS7使用Docker安裝STF安卓裝置管理平臺CentOSDocker安卓
- centos7快速安裝dockerCentOSDocker
- Centos7上安裝dockerCentOSDocker
- centos7 docker 安裝教程CentOSDocker
- centos7下安裝 dockerCentOSDocker
- centOs7安裝最新dockerCentOSDocker
- centos7下docker安裝CentOSDocker
- 在Centos7上安裝DockerCentOSDocker
- CentOS7 docker安裝部署教程CentOSDocker
- docker:安裝centos7映象(六)DockerCentOS
- Docker-CE 安裝(centos7)DockerCentOS
- Centos7編譯安裝Docker教程。CentOS編譯Docker
- centos7安裝docker詳細教程CentOSDocker
- Centos7安裝docker倉庫HarborCentOSDocker
- Centos7 安裝 Docker 詳細教程CentOSDocker
- Docker架構及在Centos7上安裝dockerDocker架構CentOS
- docker安裝使用Docker
- CentOS7安裝Docker並配置映象加速CentOSDocker
- Centos7安裝jenkins+docker部署tomcatCentOSJenkinsDockerTomcat
- CentOS7利用docker安裝MySQL5.7CentOSDockerMySql
- Linux(Centos7)安裝Docker 社群(ce)版LinuxCentOSDocker
- 一行命令安裝docker和docker-compose(CentOS7)DockerCentOS
- Docker安裝及使用Docker
- 使用docker安裝nginxDockerNginx
- docker安裝和使用Docker
- Docker安裝與使用Docker
- centos7中使用yum安裝NGINX安裝CentOSNginx
- RabbitMQ Centos7 安裝以及使用MQCentOS
- Linux 下的 Docker 安裝與使用 Docker-compose 安裝LinuxDocker
- Centos7 Docker安裝及常用引數解釋CentOSDocker
- CentOS7下安裝Docker-Compose操作記錄CentOSDocker
- CentOS7 切換阿里映象源並安裝 dockerCentOS阿里Docker