-
Notifications
You must be signed in to change notification settings - Fork 94
/
docker-compose.yml
35 lines (32 loc) · 1.26 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
version: '2'
services:
rocketchat:
image: rocketchat/rocket.chat:${ROCKET_CHAT_VERSION:-latest}
restart: unless-stopped
volumes:
- ./uploads:/app/uploads
environment:
- PORT=3000
- ROOT_URL=http://localhost:3000
- MONGO_URL=mongodb://mongo:27017/rocketchat?directConnection=true
- MONGO_OPLOG_URL=mongodb://mongo:27017/local
- OVERWRITE_SETTING_API_Enable_Rate_Limiter=false
- OVERWRITE_SETTING_Accounts_TwoFactorAuthentication_Enforce_Password_Fallback=false
- CREATE_TOKENS_FOR_USERS=true
- ROCKETCHAT_LICENSE=${ROCKETCHAT_LICENSE}
- LICENSE_DEBUG=true
depends_on:
- mongo
ports:
- "3000:3000"
mongo:
image: mongo:5
restart: unless-stopped
command: mongod --oplogSize 128 --replSet rs0
# 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:5
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