2022-07-08 01:33:50 +00:00
|
|
|
version: '3.7'
|
2022-05-30 03:52:02 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
rocketchat:
|
2022-07-08 02:14:35 +00:00
|
|
|
image: rocket.chat:{{ rc_version }}
|
2022-05-30 03:52:02 +00:00
|
|
|
command: >
|
|
|
|
bash -c
|
2022-07-08 01:33:50 +00:00
|
|
|
"for (( ; ; )); do
|
2022-05-30 03:52:02 +00:00
|
|
|
node main.js &&
|
|
|
|
s=$$? && break || s=$$?;
|
2022-07-08 01:33:50 +00:00
|
|
|
echo \"Could not start Rocket.Chat. Waiting 5 secs...\";
|
2022-05-30 03:52:02 +00:00
|
|
|
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
|
2022-07-08 01:33:50 +00:00
|
|
|
- MAIL_URL=smtp://smtp.email
|
2022-05-30 03:52:02 +00:00
|
|
|
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:
|
2022-07-08 01:33:50 +00:00
|
|
|
- ./data/db:/data/db
|
|
|
|
- ./data/dump:/dump
|
|
|
|
command: >
|
|
|
|
bash -c
|
|
|
|
"while [ ! -f /data/db/WiredTiger ]; do
|
|
|
|
echo \"wiredTiger migration hasn't started yet. Waiting 30 secs...\";
|
|
|
|
sleep 30;
|
|
|
|
done;
|
|
|
|
docker-entrypoint.sh mongod --oplogSize 128 --replSet rs0 --storageEngine=wiredTiger;"
|
|
|
|
depends_on:
|
|
|
|
- migrator
|
2022-05-30 03:52:02 +00:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=false"
|
|
|
|
|
2022-07-08 01:33:50 +00:00
|
|
|
migrator:
|
|
|
|
build: ./docker/
|
|
|
|
volumes:
|
|
|
|
- ./data/db:/data/db
|
|
|
|
|
2022-05-30 03:52:02 +00:00
|
|
|
mongo-init-replica:
|
|
|
|
image: mongo:4.0
|
|
|
|
command: >
|
|
|
|
bash -c
|
2022-07-08 01:33:50 +00:00
|
|
|
"for (( ; ; )); do
|
2022-05-30 03:52:02 +00:00
|
|
|
mongo mongo/rocketchat --eval \"
|
|
|
|
rs.initiate({
|
|
|
|
_id: 'rs0',
|
|
|
|
members: [ { _id: 0, host: 'localhost:27017' } ]})\" &&
|
|
|
|
s=$$? && break || s=$$?;
|
2022-07-08 01:33:50 +00:00
|
|
|
echo \"Could not reach MongoDB. Waiting 5 secs ...\";
|
2022-05-30 03:52:02 +00:00
|
|
|
sleep 5;
|
|
|
|
done; (exit $$s)"
|
|
|
|
depends_on:
|
2022-07-08 01:33:50 +00:00
|
|
|
- mongo
|