7
All checks were successful
Deploy Frontend / deploy (push) Successful in 2m18s

This commit is contained in:
Lee 2024-10-04 18:09:36 +01:00
parent 29a05e72a2
commit 1493295654

View File

@ -9,9 +9,6 @@ WORKDIR /app
RUN pnpm i -g turbo@^2
COPY . .
FROM base AS installer
WORKDIR /app
# Add the commit hash
ARG GIT_REV
ENV GIT_REV=${GIT_REV}
@ -22,13 +19,8 @@ ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
RUN pnpm i -g turbo@^2
# 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 turbo run build --filter=frontend
FROM base AS runner
@ -48,8 +40,8 @@ USER nextjs
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=installer --chown=nextjs:nodejs /app/apps/frontend/.next/standalone ./apps/frontend
COPY --from=installer --chown=nextjs:nodejs /app/apps/frontend/.next/static ./apps/frontend/.next/static
COPY --from=installer --chown=nextjs:nodejs /app/apps/frontend/public ./apps/frontend/public
COPY --from=builder --chown=nextjs:nodejs /app/apps/frontend/.next/standalone ./apps/frontend
COPY --from=builder --chown=nextjs:nodejs /app/apps/frontend/.next/static ./apps/frontend/.next/static
COPY --from=builder --chown=nextjs:nodejs /app/apps/frontend/public ./apps/frontend/public
CMD node /app/apps/frontend/server.js