Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed docker file for website #47

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions Dockerfile.website
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
Loading