-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
44 lines (44 loc) · 1.03 KB
/
docker-compose.yaml
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
version: '3.4'
services:
mongodb:
image: mongo:5.0
container_name : mongodb
restart: always
ports:
- 27017:27017
volumes:
- ./mongodb/db:/data/db
environment:
# provide your credentials here
- MONGO_INITDB_DATABASE=admin
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=root
- MONGO_PORT=27017
raccoon:
build:
context : ./
dockerfile : Dockerfile
container_name: raccoon
command: >
/bin/sh -c '
while ! echo >/dev/tcp/mongodb/27017;
do
echo "waiting for database ...";
sleep 3;
done;
echo "db is ready!";
npm install;
pm2-runtime start ecosystem.config.js --node-args="--max-old-space-size=4096";
'
volumes :
- ./:/nodejs/raccoon
- ./raccoon-storage:/dicomFiles
- ./raccoon-null/node_modules:/nodejs/raccoon/node_modules
ports:
- 8081:8081
- 11112:11112
depends_on:
- mongodb
tty : true
restart: on-failure:3
stdin_open : true