srivatsavdamaraju commited on
Commit
bed35e4
·
verified ·
1 Parent(s): 3a7d70f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -8
Dockerfile CHANGED
@@ -37,8 +37,8 @@ WORKDIR /app
37
  # Copy package files first (better layer caching)
38
  COPY package*.json ./
39
 
40
- # Install dependencies with production flag and clean npm cache
41
- RUN npm ci --only=production && npm cache clean --force
42
 
43
  # Copy only necessary source code files
44
  COPY . .
@@ -51,11 +51,7 @@ RUN groupadd -r nodeuser && useradd -r -g nodeuser nodeuser \
51
  USER nodeuser
52
 
53
  # Expose port
54
- EXPOSE 5000
55
-
56
- # Health check (optional but recommended)
57
- HEALTHCHECK --interval=30s --timeout=3s --start-period=40s \
58
- CMD node -e "require('http').get('http://localhost:5000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
59
 
60
  # Start the server
61
- CMD ["npm", "start"]
 
37
  # Copy package files first (better layer caching)
38
  COPY package*.json ./
39
 
40
+ # Install dependencies - use npm install instead of npm ci if no lock file
41
+ RUN npm install --production && npm cache clean --force
42
 
43
  # Copy only necessary source code files
44
  COPY . .
 
51
  USER nodeuser
52
 
53
  # Expose port
54
+ EXPOSE 7860
 
 
 
 
55
 
56
  # Start the server
57
+ CMD ["node", "server.js"]