Reapply "fix(ci):consolidate dashboard build workflow changes"
Some checks failed
Build and Push API / build-api (push) Successful in 5m35s
Build and Push Dashboard / build-dashboard (push) Successful in 14m7s
Build and Push Worker / build-worker (push) Failing after 5m30s

This reverts commit 53c989462a.
This commit is contained in:
2026-04-09 09:17:57 +02:00
parent 8ca774ad1c
commit 9a56e76dc1
5 changed files with 25 additions and 283 deletions

View File

@@ -48,6 +48,7 @@ FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-slim AS base-build
ENV COREPACK_INTEGRITY_KEYS=0
# Keep C++ build tools ONLY in the native build stage
RUN rm -f /usr/local/bin/pnpm /usr/local/bin/pnpx && npm install -g pnpm@10.6.2 && apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
@@ -96,20 +97,16 @@ COPY apps/start ./apps/start
COPY packages ./packages
COPY tooling ./tooling
# Generate Prisma client and build the app
# Generate Prisma client and build the app natively
RUN pnpm --filter start run build
# PROD - Install only production dependencies
FROM base AS prod
ENV npm_config_build_from_source=true
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
make \
g++ && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# FIX:
# Removed `npm_config_build_from_source`, `python3`, `make`, `g++`, and `pnpm rebuild`.
# This allows pnpm to instantly download pre-compiled AMD64 binaries instead of forcing
# QEMU to cross-compile C++ code on your Raspberry Pi.
WORKDIR /app
COPY --from=build /app/package.json ./
@@ -131,16 +128,14 @@ COPY --from=build /app/packages/integrations/package.json ./packages/integration
COPY --from=build /app/packages/sdks/_info/package.json ./packages/sdks/_info/
COPY --from=build /app/patches ./patches
# Install production dependencies only
# Install production dependencies only (fetches prebuilt binaries fast)
RUN pnpm install --frozen-lockfile --prod && \
pnpm rebuild && \
pnpm store prune
# FINAL - Minimal runtime image
FROM base AS runner
ENV NODE_ENV=production
ENV npm_config_build_from_source=true
WORKDIR /app