-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove minification for backend and auth-service
- Loading branch information
Showing
3 changed files
with
22 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:20-alpine3.16 as base | ||
FROM node:20.18-alpine as base | ||
|
||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
|
@@ -31,16 +31,30 @@ COPY packages/auth /app/packages/auth/ | |
|
||
RUN turbo prune @codemod-com/backend --docker | ||
|
||
|
||
|
||
FROM base AS installer | ||
WORKDIR /app | ||
|
||
RUN apk update | ||
RUN apk add --no-cache libc6-compat | ||
|
||
# First install the dependencies (as they change less often) | ||
COPY --from=builder /app/out/json/ . | ||
RUN pnpm install | ||
|
||
# Build the project | ||
COPY --from=builder /app/out/full/ . | ||
RUN pnpm build --filter @codemod-com/backend | ||
|
||
|
||
|
||
FROM base AS runner | ||
# Copy stuff for prisma to work | ||
COPY --from=builder /app/node_modules/.pnpm/@[email protected][email protected]/node_modules/.prisma/ ./node_modules/.pnpm/@[email protected][email protected]/node_modules/.prisma/ | ||
COPY --from=installer /app/node_modules/.pnpm/@[email protected][email protected]/node_modules/.prisma/ ./node_modules/.pnpm/@[email protected][email protected]/node_modules/.prisma/ | ||
|
||
WORKDIR /app | ||
COPY --from=builder /app/apps/backend ./apps/backend | ||
COPY --from=builder /app/packages/database ./packages/database | ||
COPY --from=installer /app/apps/backend ./apps/backend | ||
COPY --from=installer /app/packages/database ./packages/database | ||
|
||
CMD cd packages/database && pnpm dlx prisma@latest migrate deploy && cd - && node apps/backend/build/index.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters