-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (55 loc) · 1.31 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
services:
mongodb:
image: mongo:${MONGODB_VER:-8.0.3}
restart: unless-stopped
env_file: ./.env
environment:
- MONGO_INITDB_ROOT_USERNAME=$MONGODB_USER
- MONGO_INITDB_ROOT_PASSWORD=$MONGODB_PASSWORD
expose:
- $MONGODB_DOCKER_PORT
volumes:
- db:/data/db
app:
depends_on:
- mongodb
build:
context: app
dockerfile: ./Dockerfile
command: node /usr/src/app/docker.app.js
restart: unless-stopped
env_file: ./.env
volumes:
- ./app:/usr/src/app:ro
- .env:/app/.env:ro
ports:
- $NODE_LOCAL_PORT:$NODE_DOCKER_PORT
environment:
- WEB_PORT=$NODE_DOCKER_PORT
- DB_HOST=mongodb
- DB_USER=$MONGODB_USER
- DB_PASSWORD=$MONGODB_PASSWORD
- DB_NAME=$MONGODB_DATABASE
- DB_PORT=$MONGODB_DOCKER_PORT
stdin_open: true
tty: true
miner:
depends_on:
- mongodb
build:
context: app
dockerfile: ./Dockerfile
command: node /usr/src/app/docker.miner.js
restart: unless-stopped
env_file: ./.env
volumes:
- ./app:/usr/src/app:ro
- .env:/app/.env:ro
environment:
- DB_HOST=mongodb
- DB_USER=$MONGODB_USER
- DB_PASSWORD=$MONGODB_PASSWORD
- DB_NAME=$MONGODB_DATABASE
- DB_PORT=$MONGODB_DOCKER_PORT
volumes:
db: