rocketchat_new/docker-compose.yml

65 lines
1.7 KiB
YAML

version: "3"
services:
rocketchat:
container_name: rocketchat
image: rocket.chat:latest
restart: unless-stopped
environment:
# - PORT=3000
- ROOT_URL=https://rocket.airdog.site
- MONGO_URL=mongodb://mongo:27017/rocketchat
- MONGO_OPLOG_URL=mongodb://mongo:27017/local
- VIRTUAL_HOST=rocket.airdog.site
- LETSENCRYPT_HOST=rocket.airdog.site
- LETSENCRYPT_EMAIL=ouch@thetrauma.org
- VIRTUAL_PORT=3000
depends_on:
- mongo
networks:
mongo_back:
acme-companion_proxy-tier:
mongo:
container_name: mongo
image: mongo:latest
restart: unless-stopped
volumes:
- ./data/db:/data/db
command: mongod --oplogSize 128 --replSet rs0
networks:
mongo_back:
# 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)
# mongo-init-replica:
# image: mongo:latest
# command: >
# bash -c
# "for i in `seq 1 30`; do
# msg=$$(mongosh mongo/rocketchat --quiet --eval \"
# rs.initiate({
# _id: 'rs0',
# members: [ { _id: 0, host: 'mongo:27017' } ]})\" 2>&1)
# s=$$?
# if [ \"$$s\" -eq 0 ]; then
# break
# fi
# if [[ \"$$msg\" == \"MongoServerError: already initialized\" ]] ; then
# echo $$msg
# break
# fi
# echo \"Tried $$i times. Waiting 5 secs...\";
# sleep 5;
# done; (exit 0)"
# depends_on:
# - mongo
# networks:
# mongo_back:
networks:
mongo_back:
acme-companion_proxy-tier:
external: true