<filename>PollBuddy-Server/backend/Dockerfile
# Production Dockerfile

FROM node:16-alpine

# Create app directory
WORKDIR /usr/src/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 ./

# Only install production dependencies
RUN npm ci --only=production

# Bundle app source
# Folders
COPY bin ./bin
COPY models ./models
COPY modules ./modules
COPY public ./public
COPY routes ./routes
# Files
COPY app.js ./
COPY .env ./

# Port
EXPOSE 3000

# Start command
CMD ["node", "bin/www"]
