File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM node:23-alpine AS base
2+
3+ FROM base AS deps
4+
5+ RUN apk add --no-cache libc6-compat
6+ WORKDIR /app
7+
8+ COPY package.json pnpm-lock.yaml* .npmrc* ./
9+ RUN corepack enable pnpm && pnpm i --frozen-lockfile
10+
11+ FROM base AS builder
12+
13+ ARG API_URL_SERVER
14+ ARG CMS_HOSTNAME
15+ ARG CONFERENCE_CODE
16+
17+ WORKDIR /app
18+
19+ COPY --from=deps /app/node_modules ./node_modules
20+ COPY . .
21+
22+ RUN corepack enable pnpm && pnpm run build
23+
24+ FROM base AS runner
25+ WORKDIR /app
26+
27+ ENV NODE_ENV=production
28+ ENV NEXT_TELEMETRY_DISABLED=1
29+
30+ RUN addgroup --system --gid 1001 nodejs
31+ RUN adduser --system --uid 1001 nextjs
32+
33+ COPY --from=builder /app/public ./public
34+
35+ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
36+ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
37+
38+ USER nextjs
39+
40+ EXPOSE 3000
41+
42+ ENV PORT=3000
43+
44+ ENV HOSTNAME="0.0.0.0"
45+ CMD ["node" , "server.js" ]
You can’t perform that action at this time.
0 commit comments