yml文件
version: '3'
services:
mongo:
image: mongo:4.0
restart: unless-stopped
ports:
- 27017:27017
volumes:
- .\data\docker\mongo:/data/db
command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
hostname: mongo
container_name: rocketchat_db
labels:
- "traefik.enable=false"
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
rocketchat:
image: rocket.chat:3.0.7
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
depends_on:
- mongo
ports:
- 3000:3000
hostname: rocket.chat_3.0.7
container_name: rocketchat_ap
volumes:
- .\data\docker\rocketchat:/app/uploads
environment:
- PORT=3000
- ROOT_URL=http://localhost:3000/rocketchat
- MONGO_URL=mongodb://mongo:27017/meteor
- MONGO_OPLOG_URL=mongodb://mongo:27017/local
- ADMIN_USERNAME=admin
- ADMIN_PASS=SALAsala0033
hubot:
image: rocketchat/hubot-rocketchat:v1.0.11
depends_on:
- rocketchat
ports:
- 8080:8080
container_name: hubot
restart: unless-stopped
environment:
- ROCKETCHAT_URL=http://localhost:3000/rocketchat
- ROCKETCHAT_ROOM=test_room
- ROCKETCHAT_USER=sala
- ROCKETCHAT_PASSWORD=bot.bot
- BOT_NAME=SALA
- EXTERNAL_SCRIPTS=hubot-seen,hubot-links
volumes:
- .\data\docker\hubot:/home/hubot/scripts