Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
"for i in `seq 1 30`; do
node main.js &&
s=$$? && break || s=$$?;
echo \"Tried $$i times. Waiting 5 secs...\";
echo \"Could not start Rocket.Chat. Waiting 5 secs...\";
sleep 5;
done; (exit $$s)"
restart: unless-stopped
Expand All @@ -31,19 +31,23 @@ services:
- "traefik.frontend.rule=Host: your.domain.tld"

mongo:
image: mongo:4.0
# If you're currently running Rocket.Chat 3.x.y, use this template only after completing MMAPv1 to WiredTiger migration.
# a. How-to guide: https://docs.rocket.chat/quick-start/installing-and-updating/docker-containers/mongodb-mmap-to-wiredtiger-migration
# b. After completing migration, replace the docker-compose.yml file used in the above guide, with this one and update accordingly.
# c. Run "docker-compose up -d --remove-orphans" from the compose directory "/opt/rocketchat", based on step a.
image: mongo:4.2
restart: unless-stopped
volumes:
- ./data/db:/data/db
#- ./data/dump:/dump
command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
- ./data/dump:/dump
command: mongod --oplogSize 128 --replSet rs0
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)
# it will run the command and terminate (it will not stay running)
mongo-init-replica:
image: mongo:4.0
image: mongo:4.2
command: >
bash -c
"for i in `seq 1 30`; do
Expand All @@ -52,7 +56,7 @@ services:
_id: 'rs0',
members: [ { _id: 0, host: 'localhost:27017' } ]})\" &&
s=$$? && break || s=$$?;
echo \"Tried $$i times. Waiting 5 secs...\";
echo \"Could not reach MongoDB. Waiting 5 secs ...\";
sleep 5;
done; (exit $$s)"
depends_on:
Expand Down