forked from baloise/rocket-chat-notifier
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathdocker-compose.yml
45 lines (43 loc) · 1.18 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
36
37
38
39
40
41
42
43
44
45
version: '3.1'
services:
db:
container_name: rocketchat_mongo_db
image: mongo:4.0
command: "mongod --smallfiles --oplogSize 128 --replSet rs0"
environment:
- MONGO_PORT
ports:
- "${MONGO_PORT}:${MONGO_PORT}"
mongo-init-replica:
container_name: rocketchat_mongo_init
image: mongo:4.0
command: 'bash -c "for i in `seq 1 30`; do mongo db/rocketchat --eval \"rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''db:27017'' } ]})\" && s=$$? && break || s=$$?; echo \"Tried $$i times. Waiting 5 secs...\"; sleep 5; done; (exit $$s)"'
depends_on:
- db
rocketchat:
container_name: rocketchat_app
image: rocketchat/rocket.chat:${RC_VERSION}
environment:
- RC_VERSION
- RC_PORT
- MONGO_URL
- MONGO_OPLOG_URL
- HOME
- PORT
- ROOT_URL
- Accounts_AvatarStorePath
- ADMIN_USERNAME
- ADMIN_PASS
- ADMIN_EMAIL
restart: unless-stopped
links:
- db
depends_on:
- db
ports:
- "${RC_PORT}:${RC_PORT}"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${RC_PORT}"]
interval: 30s
timeout: 30s
retries: 5