File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+ .dockerignore
3
+ Dockerfile-dev
Original file line number Diff line number Diff line change
1
+ FROM node:latest
2
+
3
+ # set working directory
4
+ RUN mkdir /usr/src/app
5
+ WORKDIR /usr/src/app
6
+
7
+ # install and cache app dependencies
8
+ ADD package.json /usr/src/app/package.json
9
+ RUN npm install
10
+
11
+ # add `/usr/src/app/node_modules/.bin` to $PATH
12
+ ENV PATH /usr/src/app/node_modules/.bin:$PATH
13
+
14
+ # add app
15
+ COPY . /usr/src/app
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+
3
+ services :
4
+ app-db-dev :
5
+ image : mongo:latest
6
+ container_name : app-db-dev
7
+ ports :
8
+ - " 27017:27017"
9
+ expose :
10
+ - " 27017"
11
+
12
+ app-service-dev :
13
+ container_name : app-service-dev
14
+ build :
15
+ context : ./
16
+ dockerfile : Dockerfile-dev
17
+ command : npm run dev
18
+ depends_on :
19
+ - app-db-dev
20
+ volumes :
21
+ - " ./:/usr/src/app"
22
+ - " ./package.json:/usr/src/package.json"
23
+ ports :
24
+ - " 8000:8000"
25
+ environment :
26
+ MONGO_URL : " mongodb://app-db-dev:27017/SampleDB"
27
+ MONGO_URL_TEST : " mongodb://app-db-dev:27017/SampleDB"
28
+ SESSION_SECRET : " xxxxxxx"
You can’t perform that action at this time.
0 commit comments