# Use an official Node.js runtime as a parent image
FROM node:lts-alpine

# Set the working directory in the container
WORKDIR /app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN npm install

# Copy app source code to the working directory
COPY . .

# Expose the port the app runs on
EXPOSE 3000

# Run the application
CMD [ "node", "server.js" ]
