Dockerfile: build auth package and copy only dist folder

The @emdash-cms/auth package needs its built dist/ folder copied,
not the raw src. Also builds auth package after core.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kunthawat Greethong
2026-05-03 11:51:19 +07:00
parent defc69be91
commit e3dbfc44fa

View File

@@ -20,6 +20,7 @@ WORKDIR /app/emdash-source
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
RUN cd packages/core && pnpm build RUN cd packages/core && pnpm build
RUN cd packages/auth && pnpm build
# Return to app and copy source # Return to app and copy source
WORKDIR /app WORKDIR /app
@@ -29,7 +30,7 @@ COPY . .
# Remove old emdash packages and replace with patched source # Remove old emdash packages and replace with patched source
RUN rm -rf node_modules/emdash node_modules/@emdash-cms/auth RUN rm -rf node_modules/emdash node_modules/@emdash-cms/auth
RUN cp -r /app/emdash-source/packages/core node_modules/emdash RUN cp -r /app/emdash-source/packages/core node_modules/emdash
RUN cp -r /app/emdash-source/packages/auth node_modules/@emdash-cms/auth RUN cp -r /app/emdash-source/packages/auth/dist node_modules/@emdash-cms/auth
RUN pnpm build && mkdir -p storage/uploads RUN pnpm build && mkdir -p storage/uploads