Skip to content

Commit

Permalink
use standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
luojiyin1987 committed Aug 2, 2024
1 parent 82fff62 commit d316c24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@ RUN corepack enable
COPY . /app
WORKDIR /app

FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i -P --frozen-lockfile --ignore-scripts

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile
RUN pnpm build

FROM gcr.io/distroless/nodejs18-debian12
COPY --from=prod-deps /app/node_modules ./node_modules
COPY --from=build /app/public ./public
COPY --from=build /app/.next ./.next

COPY --from=build /app/.next/standalone ./
COPY --from=build /app/.next/static ./.next/static
EXPOSE 3000
CMD ["./node_modules/next/dist/bin/next", "start"]
CMD ["server.js"]
1 change: 1 addition & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const withPWA = setPWA({
const nextConfig = withPWA(
withLess(
withMDX({
output: 'standalone' ,
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],

webpack: config => {
Expand Down

1 comment on commit d316c24

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for oss-toolbox ready!

✅ Preview
https://oss-toolbox-gc1o9g7tw-techquerys-projects.vercel.app

Built with commit d316c24.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.