# Use Node.js v18.16.0 base image
FROM node:18.16.0

# Set the working directory in the container
WORKDIR /app

# Install app dependencies
# A wildcard is used to ensure package.json and package-lock.json are copied
COPY package*.json ./

# Install any needed packages specified in package.json
RUN npm install

# Bundle app source
COPY . .

# Make port 3000 available to the world outside this container
EXPOSE 3000

# Run the application
CMD ["npm", "start"]