File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change 11# Build stage
22FROM node:20-alpine AS builder
33
4- # Install dumb-init for proper signal handling
5- RUN apk add --no-cache dumb-init
6-
74WORKDIR /app
85
96# Copy package files
@@ -21,9 +18,6 @@ RUN pnpm run build
2118# Production stage
2219FROM node:20-alpine
2320
24- # Install dumb-init for proper signal handling
25- RUN apk add --no-cache dumb-init
26-
2721# Create non-root user
2822RUN addgroup -g 1001 -S nodejs && adduser -S nextjs -u 1001
2923
@@ -44,10 +38,6 @@ USER nextjs
4438# Expose port
4539EXPOSE 3000
4640
47- # Health check
48- HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
49- CMD node -e "require('http').get('http://localhost:3000', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"
50-
5141# Labels for OCI compliance and traceability
5242LABEL org.opencontainers.image.title="cmnw-next" \
5343 org.opencontainers.image.description="CMNW Next.js application" \
@@ -56,8 +46,5 @@ LABEL org.opencontainers.image.title="cmnw-next" \
5646 org.opencontainers.image.source="https://github.com/alexzedim/cmnw-next" \
5747 org.opencontainers.image.documentation="https://github.com/alexzedim/cmnw-next"
5848
59- # Use dumb-init to handle signals properly (correct path for Alpine)
60- ENTRYPOINT ["/usr/bin/dumb-init" , "--" ]
61-
6249# Start application
6350CMD ["node_modules/.bin/next" , "start" ]
You can’t perform that action at this time.
0 commit comments