Dockerfile: install deps before building packages (react is a workspace dep)

Dependencies like react and react-dom come from the workspace root catalog,
not from individual packages. Need to install all workspace packages
first so the root node_modules is populated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kunthawat Greethong
2026-05-03 16:57:16 +07:00
parent 3e9ed743dc
commit 249ca9613f

View File

@@ -12,12 +12,12 @@ RUN git clone --depth=1 https://git.moreminimore.com/kunthawat/emdash-blog-templ
WORKDIR /app/emdash WORKDIR /app/emdash
# Add blog template as workspace package # Add blog template as workspace package and install all deps
RUN cp -r /app/blog-template packages/blog-template RUN cp -r /app/blog-template packages/blog-template
# Build all packages including the blog template
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
RUN pnpm install RUN pnpm install
# Build all packages including the blog template
RUN cd packages/core && pnpm build RUN cd packages/core && pnpm build
RUN cd packages/auth && pnpm build RUN cd packages/auth && pnpm build
RUN cd packages/blocks && pnpm install && pnpm build RUN cd packages/blocks && pnpm install && pnpm build