-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
99 lines (91 loc) · 2.42 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: '3.3'
secrets:
mysql_secret:
file: ./mysql_secret.txt
rocketchat_secret:
file: ./admin_secret.txt
admin_secret:
file: ./admin_secret.txt
services:
mysql:
image: mariadb:10.7
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mysql_secret
ports:
- "13306:3306"
volumes:
- ./data/mysql:/var/lib/mysql
secrets:
- mysql_secret
www:
build: ./www-image/
container_name: www-php7-container
image: www-php7
command: >
bash -c
"php /apps/rc-setup.php;
php /apps/kaum-setup.php;
apache2-foreground"
ports:
- "8001:80"
depends_on:
- mysql
volumes:
# - ./data/www:/var/www/html
- ./data/tasks:/var/www/tasks
# - ../admin/kaum/api:/var/www/html/api
secrets:
- admin_secret
- rocketchat_secret
- mysql_secret
rocketchat:
image: rocket.chat:4
command: >
bash -c
"export ADMIN_PASS=`cat /run/secrets/rocketchat_secret`;
for i in `seq 1 30`; do
node main.js &&
s=$$? && break || s=$$?;
echo \"Tried $$i times. Waiting 5 secs...\";
sleep 5;
done; (exit $$s)"
restart: unless-stopped
secrets:
- rocketchat_secret
volumes:
- ./data/uploads:/app/uploads
environment:
- PORT=3000
- ROOT_URL=http://localhost:3000/chat/
- MONGO_URL=mongodb://mongo:27017/rocketchat
- MONGO_OPLOG_URL=mongodb://mongo:27017/local
- OVERWRITE_SETTING_Show_Setup_Wizard=completed
# - ADMIN_USERNAME=admin
# - ADMIN_NAME=Kid Actions Admin
depends_on:
- mongo
mongo:
image: mongo:4.2
restart: unless-stopped
volumes:
- ./data/db:/data/db
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:4.2
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