-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (64 loc) · 1.72 KB
/
docker-compose.yml
File metadata and controls
68 lines (64 loc) · 1.72 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: '2'
services:
# Database for rocketchat and chathost APIs
mongo:
image: mongo:4.0
logging:
driver: json-file
options:
max-size: 10m
container_name: mongo
restart: unless-stopped
ports:
- 27017:27017
volumes:
- ../data/db:/data/db
#- ./data/dump:/dump
command: mongod --smallfiles --oplogSize 128 --replSet rs0
labels:
- "traefik.enable=false"
# 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:4.0
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
# Chathost APIs
chathost:
image: 'node:14.17.5'
container_name: chathost
restart: always
working_dir: /usr/src
command: [ 'node', 'index.js' ]
depends_on:
- mongo
- rocketchat
logging:
driver: json-file
options:
max-size: 10m
environment:
- CHATHOST_PORT=2820
- CHATHOST_LOGGING=console
- CHATHOST_MONGO=mongodb://mongo:27017/chathost
- CHATHOST_ROCKETCHAT=http://rocketchat:3000
- CHATHOST_ROCKETCHATADMIN=admin
- CHATHOST_ROCKETCHATPASSWORD=${MASTERPASSWORD}
- CHATHOST_BOLT=https://bolt.${URL}
ports:
- '2820:2820/tcp'
volumes:
- ./src:/usr/src
- ./node_modules:/usr/src/node_modules
- /tmp:/tmp