-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] 배포 오류 해결
- Loading branch information
Showing
3 changed files
with
50 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM node:18-alpine AS base | ||
|
||
FROM base AS builder | ||
|
||
RUN apk update | ||
|
||
RUN apk add --no-cache libc6-compat | ||
|
||
WORKDIR /app | ||
|
||
RUN npm install -g pnpm | ||
|
||
ENV PNPM_HOME="/root/.local/share/pnpm" | ||
ENV PATH="${PATH}:${PNPM_HOME}" | ||
|
||
RUN pnpm install -g turbo@^2.2.3 | ||
|
||
COPY . . | ||
|
||
RUN turbo prune @app/media --docker | ||
|
||
FROM base AS runner | ||
|
||
RUN apk update | ||
|
||
RUN apk add --no-cache libc6-compat python3 py3-pip build-base | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /app/out/json/ . | ||
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml | ||
|
||
RUN npm install -g pnpm | ||
|
||
RUN pnpm install --frozen-lockfile | ||
|
||
COPY --from=builder /app/out/full/ . | ||
|
||
RUN pnpm build:media | ||
|
||
COPY --from=builder /app/apps/media/.env /app/apps/media/dist/.env | ||
|
||
EXPOSE 3002 | ||
|
||
ENV NODE_ENV=production | ||
|
||
CMD ["node", "/app/apps/media/dist/src/main.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