snippets/docker/docker-compose-rocketchat.yml

92 lines
2.6 KiB
YAML
Raw Permalink Normal View History

2024-10-02 23:47:38 +00:00
version: '2'
services:
db-rocketchat1:
image: mongo
restart: always
container_name: db-rocketchat1
hostname: db-rocketchat1
command: --smallfiles --keyFile /opt/keyfile --replSet "rs0"
volumes:
- ./mongo/data1:/data/db
- ./mongo/mongodb-keyfile:/opt/keyfile
networks:
mynet:
db-rocketchat2:
image: mongo
restart: always
container_name: db-rocketchat2
hostname: db-rocketchat2
command: --smallfiles --keyFile /opt/keyfile --replSet "rs0"
volumes:
- ./mongo/data2:/data/db
- ./mongo/mongodb-keyfile:/opt/keyfile
networks:
mynet:
rocketchat:
build: ./rocketchat
restart: always
container_name: rocketchat
hostname: rocketchat
entrypoint:
- /bin/bash
- /entrypoint.sh
environment:
- ROOT_URL=https://domain
- PORT=3000
- MAIL_URL=smtp.domain
- Accounts_UseDNSDomainCheck=False
- NODE_ENV=production
- Accounts_AvatarStorePath=/home/rocketchat/uploads
- MONGO_URL=mongodb://rocket:password@db-rocketchat1:27017,db-rocketchat2:27017/rocketchat?authSource=admin&replicaSet=rs0&readPreference=nearest&w=majority
- MONGO_OPLOG_URL=mongodb://oploguser:password@db-rocketchat1:27017,db-rocketchat2:27017/local?authSource=admin&replicaSet=rs0
- INSTANCE_IP=ipofthisinstance
volumes:
- ./rocketchat/uploads:/home/rocketchat/uploads
- ./rocketchat/hosts:/etc/hosts
links:
- db-rocketchat1:db-rocketchat1
- db-rocketchat2:db-rocketchat2
depends_on:
- db-rocketchat1
- db-rocketchat2
expose:
- 3000
networks:
mynet:
hubot:
build: ./hubot
restart: always
container_name: hubot
hostname: hubot
entrypoint:
- /usr/bin/sudo
- -u
- hubot
- /bin/bash
- /entrypoint.sh
volumes:
- ./hubot/external-scripts.json:/external-scripts.json
links:
- rocketchat:rocketchat
expose:
- 3001
networks:
mynet:
redis:
image: redis:alpine
hostname: redis-rocketchat
container_name: redis-rocketchat
restart: always
volumes:
- ./redis:/data
expose:
- 6379
networks:
mynet:
networks:
mynet: