Skip to content

Commit 3e4dd3d

Browse files
committed
Dockerfile
1 parent 50815b7 commit 3e4dd3d

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM node:8
2+
3+
# Create app directory
4+
RUN mkdir /src
5+
WORKDIR /src
6+
7+
8+
9+
# If you are building your code for production
10+
# RUN npm ci --only=production
11+
12+
# Bundle app source
13+
COPY ./server /src/server
14+
COPY ./public /src/public
15+
COPY ./package.json /src/package.json
16+
COPY ./server.js /src/server.js
17+
COPY ./.env /src/.env
18+
19+
RUN npm install
20+
21+
22+
EXPOSE 6001
23+
CMD [ "npm", "start" ]

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ This application uses the [IBM Cloud Databases for MongoDB service](https://clou
3333

3434
Note that the code assumes a secured connection to MongoDB using SSL and a certificate. This way you can run the app locally but connect to IBM Cloud Databases for MongoDB.
3535

36+
An alternative way of local development is using the provided Dockerfile.
37+
3638
##### Deploy to IBM Cloud
3739

3840
Option 1 (launch this app directly from this repo):

0 commit comments

Comments
 (0)