mirror of
https://github.com/LogicLabs-OU/OpenArchiver.git
synced 2026-04-06 00:31:57 +02:00
Build from tsconfig.build.json
This commit is contained in:
@@ -19,10 +19,8 @@ RUN pnpm install --shamefully-hoist --frozen-lockfile --prod=false
|
||||
# Copy the rest of the source code
|
||||
COPY . .
|
||||
|
||||
# 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
|
||||
# Build the entire project
|
||||
RUN pnpm exec tsc --build tsconfig.build.json
|
||||
|
||||
# 2. Production Stage: Install only production dependencies and copy built artifacts
|
||||
FROM node:22-alpine AS production
|
||||
@@ -37,6 +35,9 @@ COPY packages/backend/package.json ./packages/backend/
|
||||
COPY packages/frontend/package.json ./packages/frontend/
|
||||
COPY packages/types/package.json ./packages/types/
|
||||
|
||||
# Install production dependencies
|
||||
# RUN pnpm install --shamefully-hoist --frozen-lockfile --prod=true
|
||||
|
||||
# Copy built application from build stage
|
||||
COPY --from=build /app/packages/backend/dist ./packages/backend/dist
|
||||
COPY --from=build /app/packages/frontend/build ./packages/frontend/build
|
||||
|
||||
8
tsconfig.build.json
Normal file
8
tsconfig.build.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "packages/types" },
|
||||
{ "path": "packages/backend" },
|
||||
{ "path": "packages/frontend" }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user