Docker Compose
Instead of using the standard Docker commands, you may wish for a bit more automated management of the deployment. This is where the use of Docker-compose may come in handy.
  • Make sure you have Docker and Docker-compose installed and operational.
  • Create docker-compose.yml based on our example. This is the ONLY file you will need. You can create this file on your own machine by copy and pasting the content.
  • Edit image: to specify which image you wish to use (see section Docker Images Available )
  • Edit ROOT_URL to match your domain name or IP address
You can download our docker-compose.yaml:
curl -L -o docker-compose.yml
Start the stack with:
docker-compose up -d
This will:
  • Start a MongoDB service named mongo.
  • Start a service named mongo-init-replica that will wait for mongo to be ready, connect to it, initialize it and terminate itself (mongo will keep running).
  • Start a service rocketchat, that will also wait for mongo to be ready, the mongo-init-replica to initialize, and then run Rocket.Chat.
Mongo supports 24 x 7 operations and live backup. You should not need to restart it too frequently. See mongodb documentations for proper operation and management of a mongo server.
Optionally, if you want to manage your messages and configuration information, edit the file again to uncomment the volume mounts. Make sure you have a data subdirectory to mount and store the data.
Optionally, if you want a bot, so you don't have to talk to yourself, after you've created an admin user and also a bot user, edit the file docker-compose.yml again to change the variables ROCKETCHAT_USER and ROCKETCHAT_PASSWORD in the hubot section and then start up hubot:
docker-compose up -d hubot
To update the rocketchat docker image to the latest version, you can use the following commands. Your data should not be affected by this, since it's located in the mongo image.
docker pull
docker-compose stop rocketchat
docker-compose rm rocketchat
docker-compose up -d rocketchat
Last modified 6mo ago
Export as PDF
Copy link