Release: CI/CD Pipeline & Architecture Updates #177
@@ -39,14 +39,9 @@ COPY --from=deps /app/apps/api/node_modules ./apps/api/node_modules
|
|||||||
COPY packages ./packages
|
COPY packages ./packages
|
||||||
COPY apps/api ./apps/api
|
COPY apps/api ./apps/api
|
||||||
|
|
||||||
# Set working directory to API app
|
# Build the API app and its dependencies using TurboRepo
|
||||||
WORKDIR /app/apps/api
|
# This ensures @mosaic/shared is built first, then prisma:generate, then the API
|
||||||
|
RUN pnpm turbo build --filter=@mosaic/api
|
||||||
# Generate Prisma client
|
|
||||||
RUN pnpm prisma:generate
|
|
||||||
|
|
||||||
# Build the application
|
|
||||||
RUN pnpm build
|
|
||||||
|
|
||||||
# ======================
|
# ======================
|
||||||
# Production stage
|
# Production stage
|
||||||
|
|||||||
@@ -39,15 +39,13 @@ COPY --from=deps /app/apps/web/node_modules ./apps/web/node_modules
|
|||||||
COPY packages ./packages
|
COPY packages ./packages
|
||||||
COPY apps/web ./apps/web
|
COPY apps/web ./apps/web
|
||||||
|
|
||||||
# Set working directory to web app
|
|
||||||
WORKDIR /app/apps/web
|
|
||||||
|
|
||||||
# Build arguments for Next.js
|
# Build arguments for Next.js
|
||||||
ARG NEXT_PUBLIC_API_URL
|
ARG NEXT_PUBLIC_API_URL
|
||||||
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
||||||
|
|
||||||
# Build the application
|
# Build the web app and its dependencies using TurboRepo
|
||||||
RUN pnpm build
|
# This ensures @mosaic/shared and @mosaic/ui are built first
|
||||||
|
RUN pnpm turbo build --filter=@mosaic/web
|
||||||
|
|
||||||
# ======================
|
# ======================
|
||||||
# Production stage
|
# Production stage
|
||||||
|
|||||||
Reference in New Issue
Block a user