github地址
https://github.com/RocketChat/Rocket.Chat
docker-compose文檔
https://docs.rocket.chat/installation/docker-containers/docker-compose
獲取docker-compose文件
輸入命令
curl -L -o docker-compose.yml
文件內容為
version: '2' services: rocketchat: image: rocketchat/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=http://localhost:3000 - MONGO_URL=mongodb://mongo:27017/rocketchat - MONGO_OPLOG_URL=mongodb://mongo:27017/local - MAIL_URL=smtp://smtp.email # - HTTP_PROXY=http://proxy.domain.com # - HTTPS_PROXY=http://proxy.domain.com depends_on: - mongo ports: - 3000:3000 labels: - "traefik.backend=rocketchat" - "traefik.frontend.rule=Host: your.domain.tld" mongo: image: 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: 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 # hubot, the popular chatbot (add the bot user first and change the password before starting this image) hubot: image: rocketchat/hubot-rocketchat:latest restart: unless-stopped environment: - ROCKETCHAT_URL=rocketchat:3000 - ROCKETCHAT_ROOM=GENERAL - ROCKETCHAT_USER=bot - ROCKETCHAT_PASSWORD=botpassword - BOT_NAME=bot # you can add more scripts as you'd like here, they need to be installable by npm - EXTERNAL_SCRIPTS=hubot-help,hubot-seen,hubot-links,hubot-diagnostics depends_on: - rocketchat labels: - "traefik.enable=false" volumes: - ./scripts:/home/hubot/scripts # this is used to expose the hubot port for notifications on the host on port 3001, e.g. for hubot-jenkins-notifier ports: - 3001:8080 #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
修改文件
nano docker-compose.yml
修改ports為自定義端口,默認為3000,此處我修改為5001
輸入命令
docker-compose up -d
使用http://IP:端口
默認進(jìn)入安裝向導
設置管理員信息
設置組織信息
設置服務(wù)器信息
注冊服務(wù)器
設置成功
進(jìn)入默認公共聊天室
點(diǎn)擊左上角設置,創(chuàng )建用戶(hù)
為了測試兩個(gè)用戶(hù)之間的聯(lián)系
測試文字,emoji,圖片,語(yǔ)音,視頻,視頻會(huì )議
申請SSLssl/' target='_blank'>證書(shū),使用nginx代理之前的ip:端口即可
同時(shí)域名解析到對應服務(wù)器ip
server { listen 443; # rocketchat server_name rocketchat.domain.com; ssl on; # root html; # index index.html index.htm; # SSL證書(shū)放在了同級目錄domain文件夾下面 ssl_certificate cert/domain/rocketchat.domain.com_bundle.crt; ssl_certificate_key cert/domain/rocketchat.domain.com.key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; location / { # 指向當前的某個(gè)服務(wù)端口 proxy_pass http://127.0.0.1:5001; #設置請求頭,并將頭信息傳遞給服務(wù)器端 proxy_redirect off; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
Tips
一些如語(yǔ)音消息,視頻消息,文件傳送,APP應用等,都需要前提是https協(xié)議訪(fǎng)問(wèn)
建議及時(shí)配置Https,如果只是簡(jiǎn)單嘗試使用,則使用ip:端口即可
以上就是docker安裝rockerChat設置聊天室的詳細內容,更多關(guān)于docker rockerChat聊天室的資料請關(guān)注腳本之家其它相關(guān)文章!
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng )、來(lái)自本網(wǎng)站內容采集于網(wǎng)絡(luò )互聯(lián)網(wǎng)轉載等其它媒體和分享為主,內容觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如侵犯了原作者的版權,請告知一經(jīng)查實(shí),將立刻刪除涉嫌侵權內容,聯(lián)系我們QQ:712375056,同時(shí)歡迎投稿傳遞力量。
Copyright ? 2009-2022 56dr.com. All Rights Reserved. 特網(wǎng)科技 特網(wǎng)云 版權所有 特網(wǎng)科技 粵ICP備16109289號
域名注冊服務(wù)機構:阿里云計算有限公司(萬(wàn)網(wǎng)) 域名服務(wù)機構:煙臺帝思普網(wǎng)絡(luò )科技有限公司(DNSPod) CDN服務(wù):阿里云計算有限公司 百度云 中國互聯(lián)網(wǎng)舉報中心 增值電信業(yè)務(wù)經(jīng)營(yíng)許可證B2
建議您使用Chrome、Firefox、Edge、IE10及以上版本和360等主流瀏覽器瀏覽本網(wǎng)站