Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334# syntax=docker/dockerfile:1ARG VERSION
FROM node:26-slim AS buildWORKDIR /app# Node 26 no longer includes Corepack. Keep this pin aligned with mise.toml.RUN npm install --global pnpm@11.28.10COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./RUN pnpm fetch --frozen-lockfileCOPY . .RUN pnpm install --offline --frozen-lockfileARG VERSION# Ordinary deploys keep package.json's version; release builds can override it.# Protocol and crypto export source; Vite and tsup compile them into their consumers.RUN if [ -n "$VERSION" ]; then npm pkg set --prefix apps/server version="$VERSION"; fi \ && pnpm --filter @pneumo/web --filter @pneumo/server run build \ && pnpm --filter @pneumo/server deploy --legacy --prod /prod/server
FROM node:26-slim AS runtimeARG VERSIONLABEL org.opencontainers.image.version="$VERSION"ENV NODE_ENV=production \ WEB_DIST_DIR=/app/apps/web/distWORKDIR /appRUN groupadd --gid 10001 pneumo \ && useradd --uid 10001 --gid pneumo --no-create-home --shell /usr/sbin/nologin pneumoCOPY --from=build /prod/server/node_modules ./apps/server/node_modulesCOPY --from=build /prod/server/package.json ./apps/server/package.jsonCOPY --from=build /app/apps/server/dist ./apps/server/distCOPY --from=build /app/apps/web/dist ./apps/web/distUSER 10001:10001EXPOSE 8080CMD ["node", "apps/server/dist/index.js"]