1FROM node:12
2
3ENV PORT 3000
4
5# Create app directory
6RUN mkdir -p /usr/src/app
7WORKDIR /usr/src/app
8
9# Installing dependencies
10COPY package*.json /usr/src/app/
11RUN npm install
12
13# Copying source files
14COPY . /usr/src/app
15
16# Building app
17RUN npm run build
18EXPOSE 3000
19
20# Running the app
21CMD "npm" "run" "dev"
22