From 17f7e949ca8d3e15947fc018d3a1bb2228032f46 Mon Sep 17 00:00:00 2001 From: Bikash Date: Thu, 21 Dec 2023 13:57:38 +0530 Subject: [PATCH] Fixed docker file for website --- Dockerfile.website | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/Dockerfile.website b/Dockerfile.website index 5f67f8eec..602f2172e 100644 --- a/Dockerfile.website +++ b/Dockerfile.website @@ -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 \ No newline at end of file +ENTRYPOINT npm run start \ No newline at end of file