# Stage 1: Build the application
FROM node:12-alpine

# Setting working directory. 
WORKDIR /usr/src/app

# Installing dependencies
COPY package*.json /usr/src/app/
RUN npm install

# Copying source files
COPY . .

RUN npm install dotenv

# Build files
RUN npm run build


EXPOSE 3400

# Running the app
CMD [ "npm", "start" ]