Last active
December 23, 2018 12:01
-
-
Save salehi/1a5e95389d3fb5ed7a9631c678559e5a to your computer and use it in GitHub Desktop.
Rocket Chat docker-compose
This file contains hidden or 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.7' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
- ./certs:/etc/nginx/certs | |
rocketchat: | |
image: rocketchat/rocket.chat:latest | |
restart: always | |
volumes: | |
- ./uploads:/app/uploads | |
environment: | |
- VIRTUAL_HOST=rocket.snappfood.ir | |
- VIRTUAL_PORT=3000 | |
- PORT=3000 | |
- ROOT_URL=http://rocket.snappfood.ir | |
- MONGO_URL=mongodb://mongo:27017/rocketchat | |
- MONGO_OPLOG_URL=mongodb://mongo:27017/local | |
- MAIL_URL=smtp://localhost | |
# - HTTP_PROXY=http://proxy.domain.com | |
# - HTTPS_PROXY=http://proxy.domain.com | |
depends_on: | |
- mongo | |
mongo: | |
image: mongo:3.2 | |
restart: always | |
volumes: | |
- ./data/db:/data/db | |
#- ./data/dump:/dump | |
command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1 | |
# 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:3.2 | |
command: 'mongo mongo/rocketchat --eval "rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})"' | |
depends_on: | |
- mongo | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment