Skip to content

Commit

Permalink
build: slim-docker-github-action (#20)
Browse files Browse the repository at this point in the history
Co-authored-by: South Drifted <[email protected]>
  • Loading branch information
luojiyin1987 and TechQuery committed Aug 3, 2024
1 parent 1a28670 commit 62eb6ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ 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 base
COPY --from=prod-deps /app/node_modules ./node_modules
COPY --from=build /app/.next/standalone ./
COPY --from=build /app/public ./public
COPY --from=build /app/.next ./.next
COPY --from=build /app/.next/static ./.next/static
EXPOSE 3000
CMD ["npm", "start"]
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
CMD ["node", "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 62eb6ce

@github-actions
Copy link

@github-actions github-actions bot commented on 62eb6ce Aug 3, 2024

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-b2afsxvbq-techquerys-projects.vercel.app

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

Please sign in to comment.