-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable to build and push clover-ui image
- Loading branch information
1 parent
40df1ff
commit 72ffadc
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM node:22-bullseye-slim AS base | ||
|
||
ENV NODE_ENV=production | ||
|
||
RUN corepack enable | ||
|
||
# build stage | ||
|
||
FROM base AS build | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json pnpm-lock.yaml ./ | ||
RUN pnpm install --frozen-lockfile --prod=false | ||
|
||
COPY . . | ||
RUN pnpm run build | ||
RUN pnpm prune --prod | ||
|
||
# runtime stage | ||
|
||
FROM base | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json . | ||
COPY --from=build /app/node_modules /app/node_modules | ||
COPY --from=build /app/build/client /app/build/client | ||
COPY --from=build /app/build/server /app/build/server | ||
|
||
RUN corepack install | ||
|
||
CMD ["pnpm", "start"] |