Skip to content

Instantly share code, notes, and snippets.

@fliedonion
Created July 9, 2020 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fliedonion/669f1aa5649ebeba792ac911e5bf1541 to your computer and use it in GitHub Desktop.
Save fliedonion/669f1aa5649ebeba792ac911e5bf1541 to your computer and use it in GitHub Desktop.
rocket.chat 3.4.1 / let's chat docker-compose sample
version: "3"
services:
letschat:
image: sdelements/lets-chat
# image: lets-chat:2020-07-08
links:
- mongo
ports:
- 8080:8080
rocketchat:
image: rocketchat/rocket.chat:latest
environment:
- PORT=3000
# - MAIL_URL=
- MONGO_URL=mongodb://mongo:27017/rocketchat
- MONGO_OPLOG_URL=mongodb://mongo:27017/local
- Accounts_UseDNSDomainCheck=false
links:
- mongo
restart: unless-stopped
ports:
- 3000:3000
mongo:
image: mongo:3.6.13
restart: unless-stopped
command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
volumes:
- ./data/runtime/db:/data/db
- ./data/dump:/dump
# this container's job is just to 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:3.6.13
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment