Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docker): fixes build step in docker files #47

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Dockerfile.backend
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ FROM base AS build
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --filter=api
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm deploy --filter=api --prod /app --ignore-scripts
RUN pnpm run build --filter=@auth-system/api
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm deploy --filter=api /app --ignore-scripts
WORKDIR /app
RUN pnpm run build

FROM base AS app
COPY --from=build /app/build /app/build
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.frontend
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ FROM base AS build
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --filter=app
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm deploy --filter=app --prod /app --ignore-scripts
RUN pnpm run build --filter=@auth-system/app
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm deploy --filter=app /app --ignore-scripts
WORKDIR /app
RUN pnpm run build

FROM nginx:1.27.2-alpine AS app
COPY --from=build /app/build /usr/share/nginx/html
Expand Down