Skip to content

Commit a06f0a9

Browse files
author
vedantoncloud
committed
fix: correct Dockerfile for CI/CD & Render deploy
1 parent ea1bcd0 commit a06f0a9

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

Dockerfile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1+
# Use official Node image
12
FROM node:18-alpine
2-
WORKDIR /app
3+
4+
# App working directory
5+
WORKDIR /usr/src/app
6+
7+
# Copy package files first
38
COPY package*.json ./
4-
RUN npm install --only=prod
9+
10+
# Install ONLY production dependencies (faster, cleaner)
11+
RUN npm ci --only=production
12+
13+
# Copy all source code
514
COPY . .
6-
ENV PORT=3000
15+
16+
# Expose port (important for Render)
17+
EXPOSE 3000
18+
19+
# Start the app
720
CMD ["node", "app.js"]

0 commit comments

Comments
 (0)