-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (36 loc) · 1.14 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
version: '3.3'
services:
server:
build:
context: server
ports:
- "3000:3000"
environment:
PORT: 3000
DB_HOST: mongo
volumes:
- ./server:/usr/src/app
- /usr/src/app/node_modules
depends_on:
[mongo]
mongo:
image: mongo
container_name: mongo
ports:
- 27017:27017
mongo-seed:
image: stefanwalther/mongo-seed
container_name: mongo-seed
environment:
- MONGODB_HOST=mongo
- MONGODB_PORT=27017
volumes:
- ./config/db-seed:/data
depends_on:
- mongo
command: [
"mongoimport --host mongo --port 27017 --db NodeJsBackendChallenge --mode upsert --type json --file /data/users.json --jsonArray",
"mongoimport --host mongo --port 27017 --db NodeJsBackendChallenge --mode upsert --type json --file /data/sites.json --jsonArray",
"mongoimport --host mongo --port 27017 --db NodeJsBackendChallenge --mode upsert --type json --file /data/WorkerAttendence.json --jsonArray",
"mongoimport --host mongo --port 27017 --db NodeJsBackendChallenge --mode upsert --type json --file /data/WorkerTimeSheet.json --jsonArray"
]