CI / Code Health (pull_request) Successful in 21s
CI / Lint & Build (pull_request) Successful in 33s
CI / Code Health (push) Successful in 22s
Deploy / Build & Push Image (push) Successful in 32s
CI / Lint & Build (push) Successful in 35s
Deploy / Trigger Deploy (push) Successful in 1s
21 lines
579 B
Docker
21 lines
579 B
Docker
FROM node:lts-alpine AS builder
|
|
RUN npm install -g pnpm@11.2.2
|
|
ENV CI=true
|
|
WORKDIR /app
|
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
|
RUN pnpm install --frozen-lockfile
|
|
COPY . .
|
|
RUN pnpm build
|
|
|
|
FROM node:lts-alpine AS runner
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3000
|
|
ENV HOSTNAME="0.0.0.0"
|
|
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
USER nextjs
|
|
EXPOSE 3000
|
|
CMD ["node", "server.js"]
|