-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from kloudlite/features/design
Fixed docker file for website
- Loading branch information
Showing
1 changed file
with
24 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,31 @@ | ||
FROM node:20.8.1-alpine as node | ||
FROM node:20.8.1-alpine as base | ||
# RUN apk add g++ make py3-pip | ||
RUN npm i -g pnpm | ||
WORKDIR /app | ||
COPY ./package.json ./package.json | ||
|
||
COPY ./src/apps/devdoc ./src/apps/devdoc | ||
COPY ./src/design-system/tailwind-base.js ./src/design-system/tailwind-base.js | ||
COPY ./src/design-system/css-plugins ./src/design-system/css-plugins | ||
COPY ./src/design-system/css ./src/design-system/css | ||
COPY ./src/design-system/out ./src/design-system/out | ||
COPY ./src/generated/package.json ./src/generated/package.json | ||
COPY ./src/generated/plugin/package.json ./src/generated/plugin/package.json | ||
|
||
WORKDIR /app/src/apps/devdoc | ||
RUN pnpm i | ||
|
||
RUN npm i -g pnpm | ||
# design system | ||
COPY ./src/design-system/ ./src/design-system/ | ||
WORKDIR /app/src/design-system | ||
RUN pnpm i -p | ||
RUN pnpm local:release | ||
|
||
# website | ||
WORKDIR /app | ||
COPY ./src/apps/devdoc ./src/apps/devdoc | ||
WORKDIR /app/src/apps/devdoc | ||
RUN pnpm i -p | ||
RUN pnpm build | ||
|
||
RUN npm run build | ||
FROM node:20.8.1-alpine | ||
WORKDIR /app | ||
COPY --from=base /app/src/apps/devdoc/.next ./.next | ||
COPY --from=base /app/src/apps/devdoc/package.json ./package.json | ||
COPY --from=base /app/src/apps/devdoc/node_modules ./node_modules | ||
|
||
ENTRYPOINT pnpm start | ||
ENTRYPOINT npm run start |