AI-Syntax / Dockerfile.node
Hariprasath5128's picture
πŸš€ FINAL: Definitively Clean Launch (AI-Syntax New Space)
0f95125
raw
history blame contribute delete
499 Bytes
# Node.js Backend Dockerfile
FROM node:18-slim
WORKDIR /app
# Copy the frontend dependencies first (Node server depends on them)
COPY frontend/package*.json ./frontend/
# Install dependencies in the frontend folder
RUN cd frontend && npm install --production
# Copy the server file and env
COPY frontend/src/server.js ./frontend/src/
COPY .env .
# Expose Node port
EXPOSE 5003
# Run from the frontend/src directory where server.js expects relative paths
CMD ["node", "frontend/src/server.js"]