add docker files

This commit is contained in:
2025-07-07 02:06:26 +05:30
parent 5f25b81b35
commit cf0643c207
5 changed files with 61 additions and 0 deletions

6
backend/.dockerignore Normal file
View File

@ -0,0 +1,6 @@
node_modules
uploads
.git
.dockerignore
Dockerfile
.env

20
backend/Dockerfile Normal file
View File

@ -0,0 +1,20 @@
# Use the official Node.js 23.10 image
FROM node:23.10
# Set working directory inside the container
WORKDIR /app
# Copy only package.json and lock file first for caching
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the app (after installing dependencies for cache efficiency)
COPY . .
# Expose the port your server listens on (adjust if needed)
EXPOSE 8005
# Start the app
CMD ["node", "server.js"]