Skip to content

Commit 07aa8a4

Browse files
committed
Create dockerfile
1 parent 8f2986c commit 07aa8a4

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
npm-debug.log

Dockerfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
2+
3+
FROM node:12
4+
5+
# Create app directory
6+
WORKDIR /usr/src/app
7+
8+
# Install app dependencies
9+
# A wildcard is used to ensure both package.json AND package-lock.json are copied
10+
# where available (npm@5+)
11+
COPY package*.json ./
12+
13+
RUN npm install
14+
# If you are building your code for production
15+
# RUN npm ci --only=production
16+
17+
# Bundle app source
18+
COPY . .
19+
20+
EXPOSE 80
21+
ENV PORT=80
22+
23+
CMD [ "npm", "start" ]

0 commit comments

Comments
 (0)