Comprehensive Documentationgithub address https://github.com/RocketChat/Rocket.Chat docker-compose documentation https://docs.rocket.chat/installation/docker-containers/docker-compose Configuration FilesGet the docker-compose file Enter the command
The file content is 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 running 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='[email protected]' # --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 Modify the file
Change ports to a custom port, the default is 3000, here I change it to 5001 Start the serviceEnter the command
Access ServicesUse http://IP:Port Enter the installation wizard by default Set administrator information Set organization information Set server information Register Server Set up for success Enter the default public chat room Click on the upper left corner to create a user To test the connection between two users Test text, emoji, picture, voice, video, video conference Setting up httpsApply for an SSL certificate and use the IP: port number before the nginx proxy. At the same time, the domain name is resolved to the corresponding server IP server { listen 443; # rocketchat server_name rocketchat.domain.com; ssl on; #root html; # index index.html index.htm; # The SSL certificate is placed in the domain folder at the same level 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 / { #Point to a current service port proxy_pass http://127.0.0.1:5001; #Set the request header and pass the header information to the server 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 Some services, such as voice messages, video messages, file transfers, APP applications, etc., require https protocol access. It is recommended to configure Https in time. If you just want to try it, just use ip:port. The above is the details of how to install rockerChat in docker and set up a chat room. For more information about the docker rockerChat chat room, please pay attention to other related articles on 123WORDPRESS.COM! |
<<: Five delay methods for MySQL time blind injection
>>: Using text shadow and element shadow effects in CSS
SELECT * FROM table name limit m,n; SELECT * FROM...
Personally, I think the decompressed version is e...
<template> <div id="root"> ...
Table of contents Data volume Anonymous and named...
Table of contents 1. Add packaging command 2. Run...
1. View existing modules /usr/local/nginx/sbin/ng...
This article example shares the specific code for...
There is only one solution, that is to change the...
Preface I believe that everyone has been developi...
The <area> tag is mainly used in image maps...
The full name of Blog should be Web log, which me...
Table of contents 1. Template tag in HTML5 2. Pro...
Function currying (black question mark face)? ? ?...
The Document Object Model (DOM) is a platform, a ...
We know that the properties of the select tag in e...