Last active
February 6, 2024 13:30
-
-
Save caiqueportela/6272158071b4f22a0cfd0e2726c3d858 to your computer and use it in GitHub Desktop.
Rocket.Chat docker-compose file to develop Apps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.0" | |
services: | |
rocketchat: | |
image: rocketchat/rocket.chat:3.16.2 | |
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 | |
- ADMIN_USERNAME=rocket | |
- ADMIN_PASS=PZxs7wsHWEJLP98z | |
- ADMIN_EMAIL=admin@rocketchat.local | |
depends_on: | |
- mongo | |
ports: | |
- 3000:3000 | |
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 | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment