这是indexloc提供的服务,不要输入任何密码
Skip to content
Discussion options

You must be logged in to vote

This demonstrates how to use pnpm, this is a Dockerfile for the nuxt app

FROM node:18-alpine as base
ARG APP_NAME
WORKDIR /app

FROM base as pnpm
RUN corepack enable

FROM base as workspace
RUN yarn global add turbo
COPY . .
RUN turbo prune --scope $APP_NAME --docker

FROM pnpm AS builder
COPY .gitignore .gitignore
COPY --from=workspace /app/out/json/ .
COPY --from=workspace /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
RUN pnpm install
COPY --from=workspace /app/out/full/ .
RUN pnpm exec turbo run build --filter=$APP_NAME...

FROM base
COPY --from=builder /app/apps/$APP_NAME/.output .output
EXPOSE 3000
CMD ["node", "/app/.output/server/index.mjs"]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by anthonyshew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants