Build package separately

This commit is contained in:
Wayne
2025-08-03 01:00:05 +03:00
parent 95445dcd37
commit f45ed3a62a
3 changed files with 6 additions and 8 deletions

View File

@@ -13,14 +13,16 @@ COPY packages/backend/package.json ./packages/backend/
COPY packages/frontend/package.json ./packages/frontend/
COPY packages/types/package.json ./packages/types/
# Install all dependencies
# Install all dependencies to create workspace links
RUN pnpm install --frozen-lockfile --prod=false
# Copy the rest of the source code
COPY . .
# Build all packages.
RUN pnpm build
# Build packages in order.
RUN pnpm --filter @open-archiver/types build
RUN pnpm --filter @open-archiver/backend build
RUN pnpm --filter @open-archiver/frontend build
# 2. Production Stage: Install only production dependencies and copy built artifacts
FROM node:22-alpine AS production

View File

@@ -3,7 +3,7 @@
"private": true,
"scripts": {
"dev": "dotenv -- pnpm --filter \"./packages/*\" --parallel dev",
"build": "tsc -b tsconfig.build.json && pnpm --filter @open-archiver/frontend build",
"build": "pnpm --filter \"./packages/*\" --parallel build",
"start": "dotenv -- pnpm --filter \"./packages/*\" --parallel start",
"start:workers": "dotenv -- concurrently \"pnpm --filter @open-archiver/backend start:ingestion-worker\" \"pnpm --filter @open-archiver/backend start:indexing-worker\" \"pnpm --filter @open-archiver/backend start:sync-scheduler\"",
"start:workers:dev": "dotenv -- concurrently \"pnpm --filter @open-archiver/backend start:ingestion-worker:dev\" \"pnpm --filter @open-archiver/backend start:indexing-worker:dev\" \"pnpm --filter @open-archiver/backend start:sync-scheduler:dev\"",

View File

@@ -1,4 +0,0 @@
{
"files": [],
"references": [{ "path": "packages/types" }, { "path": "packages/backend" }]
}