dockerize app

This commit is contained in:
William Diakite 2025-07-24 13:14:46 -04:00
parent a68ca93427
commit 1e363f6c66
8 changed files with 87 additions and 3 deletions

20
Dockerfile Normal file
View file

@ -0,0 +1,20 @@
# Use the official Node.js image as a base
FROM node:18-slim
# Copy package.json and package-lock.json (if available)
COPY package*.json ./
# Install dependencies
RUN npm install && npm cache clean --force && rm -rf /root/.npm && rm -rf /tmp/*
# Copy the rest of your application code
COPY . .
# Set the NODE_ENV environment variable
ENV NODE_ENV=production
# Expose the port the app runs on (adjust as needed)
EXPOSE 1111
# Start the application
CMD ["npm", "run", "start"]