# Create image based on the official Node image from dockerhub
FROM node:24-slim

WORKDIR /app

# Get all the code needed to run the app
COPY . .

# Install dependencies
RUN npm set progress=false && npm ci --omit=dev

# don't use the localhost .env file, make sure everything comes from environment
RUN rm -f .env
 
# Expose the port the app runs in
EXPOSE 3000
#
# Serve the app
CMD ["npm", "start"]
