File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "databaseConfig" : {
3- "host" : " localhost " ,
3+ "host" : " mongodb " ,
44 "database" : " funWithDocker"
55 }
66}
Original file line number Diff line number Diff line change 1+ {
2+ "databaseConfig" : {
3+ "host" : " mongodb" ,
4+ "database" : " funWithDocker"
5+ }
6+ }
Original file line number Diff line number Diff line change 1515# docker run -d --name my-mongodb mongo
1616# docker run -d -p 3000:3000 --link my-mongodb:mongodb --name nodeapp danwahlin/node
1717
18- FROM node:alpine
18+ FROM node:alpine
1919
20- LABEL author="Dan Wahlin"
20+ LABEL author="Dan Wahlin"
2121
22- ENV NODE_ENV=development
23- ENV PORT=3000
22+ ENV NODE_ENV=production
23+ ENV PORT=3000
2424
25- COPY . /var/www
26- WORKDIR /var/www
25+ WORKDIR /var/www
26+ COPY package.json package-lock.json ./
27+ RUN npm install
2728
28- RUN npm install
29+ COPY . ./
30+ EXPOSE $PORT
2931
30- EXPOSE $PORT
31-
32- ENTRYPOINT ["npm" , "start" ]
32+ ENTRYPOINT ["npm" , "start" ]
You can’t perform that action at this time.
0 commit comments