Files
fristy 9af3043972
CI / Code Health (pull_request) Successful in 8s
CI / Lint & Build (pull_request) Successful in 32s
fix(docker): take the pnpm version from package.json
The Dockerfile pinned pnpm@11.2.2 while package.json declares
packageManager pnpm@12.17.0. Renovate only updates the npm manager's
packageManager field and the lockfile, so the RUN line drifted a major
behind and no longer described the build.

pnpm 10+ already reads packageManager and downloads that version at
runtime, so the pin was also dead weight: the deploy log shows
"npm install -g pnpm@11.2.2" followed by "Done in 16.8s using pnpm
v12.16.1".

Read the version from package.json instead, so the one field Renovate
maintains is the only source of truth.
2026-11-06 13:20:02 +03:00

22 lines
730 B
Docker

FROM node:lts-alpine AS builder
ENV CI=true
WORKDIR /app
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
# The version comes from packageManager in package.json, which Renovate keeps current.
RUN npm install -g pnpm@$(node -p "require('./package.json').packageManager.split('@').pop()")
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"]