Benny-Tang commited on
Commit
e14cd5f
·
verified ·
1 Parent(s): 873de28

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -9
Dockerfile CHANGED
@@ -7,7 +7,7 @@ WORKDIR /app
7
  COPY package.json ./
8
 
9
  # Install pnpm and dependencies
10
- RUN npm install -g pnpm && pnpm install --frozen-lockfile
11
 
12
  # Copy source code
13
  COPY . .
@@ -24,10 +24,10 @@ WORKDIR /app
24
  RUN npm install -g pnpm
25
 
26
  # Copy package files from builder
27
- COPY package.json pnpm-lock.yaml ./
28
 
29
  # Install production dependencies only
30
- RUN pnpm install --frozen-lockfile --prod
31
 
32
  # Copy built application from builder
33
  COPY --from=builder /app/dist ./dist
@@ -37,12 +37,9 @@ COPY --from=builder /app/drizzle ./drizzle
37
  # Set environment to production
38
  ENV NODE_ENV=production
39
 
40
- # Expose port (Cloud Run uses PORT env var, defaults to 8080)
41
- EXPOSE 8080
42
-
43
- # Health check
44
- HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
45
- CMD node -e "require('http').get('http://localhost:8080/health', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"
46
 
47
  # Start the application
48
  CMD ["node", "dist/index.js"]
 
 
7
  COPY package.json ./
8
 
9
  # Install pnpm and dependencies
10
+ RUN npm install -g pnpm && pnpm install
11
 
12
  # Copy source code
13
  COPY . .
 
24
  RUN npm install -g pnpm
25
 
26
  # Copy package files from builder
27
+ COPY package.json ./
28
 
29
  # Install production dependencies only
30
+ RUN pnpm install --prod
31
 
32
  # Copy built application from builder
33
  COPY --from=builder /app/dist ./dist
 
37
  # Set environment to production
38
  ENV NODE_ENV=production
39
 
40
+ # Expose port
41
+ EXPOSE 3000
 
 
 
 
42
 
43
  # Start the application
44
  CMD ["node", "dist/index.js"]
45
+