fix(ci):overhaul the dash build
Some checks failed
Build and Push API / build-api (push) Successful in 8m11s
Build and Push Dashboard / build-dashboard (push) Failing after 37m52s
Build and Push Worker / build-worker (push) Successful in 8m25s
Build and Push API / build-api (pull_request) Successful in 7m13s
Build and Push Dashboard / build-dashboard (pull_request) Failing after 34m41s
Build and Push Worker / build-worker (pull_request) Successful in 6m52s
Some checks failed
Build and Push API / build-api (push) Successful in 8m11s
Build and Push Dashboard / build-dashboard (push) Failing after 37m52s
Build and Push Worker / build-worker (push) Successful in 8m25s
Build and Push API / build-api (pull_request) Successful in 7m13s
Build and Push Dashboard / build-dashboard (pull_request) Failing after 34m41s
Build and Push Worker / build-worker (pull_request) Successful in 6m52s
This commit is contained in:
@@ -39,16 +39,51 @@ COPY patches ./patches
|
||||
# Copy tracking script to self-hosting dashboard
|
||||
COPY apps/public/public/op1.js ./apps/start/public/op1.js
|
||||
|
||||
# BUILD - run natively on the CI runner to avoid QEMU crashes (esbuild Go runtime)
|
||||
FROM --platform=$BUILDPLATFORM base AS build
|
||||
# BASE-BUILD - native platform image so the build step runs without QEMU.
|
||||
# "FROM --platform=$BUILDPLATFORM base AS build" alone is not enough because
|
||||
# `base` has no --platform override, so Docker resolves it from the target-platform
|
||||
# cache (linux/amd64) and the build stage still runs under QEMU emulation on ARM64
|
||||
# runners, causing esbuild's Go runtime to crash.
|
||||
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-slim AS base-build
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ENV COREPACK_INTEGRITY_KEYS=0
|
||||
|
||||
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 \
|
||||
openssl \
|
||||
libssl3 \
|
||||
curl \
|
||||
python3 \
|
||||
make \
|
||||
g++ && \
|
||||
apt-get clean && \
|
||||
g++ \
|
||||
&& apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV NITRO=1
|
||||
ENV SELF_HOSTED=1
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||
COPY apps/start/package.json ./apps/start/
|
||||
COPY packages/trpc/package.json packages/trpc/
|
||||
COPY packages/json/package.json packages/json/
|
||||
COPY packages/common/package.json packages/common/
|
||||
COPY packages/importer/package.json packages/importer/
|
||||
COPY packages/payments/package.json packages/payments/
|
||||
COPY packages/constants/package.json packages/constants/
|
||||
COPY packages/validation/package.json packages/validation/
|
||||
COPY packages/integrations/package.json packages/integrations/
|
||||
COPY packages/sdks/_info/package.json packages/sdks/_info/
|
||||
COPY patches ./patches
|
||||
COPY apps/public/public/op1.js ./apps/start/public/op1.js
|
||||
|
||||
# BUILD - inherits from base-build (native runner platform) so esbuild runs without QEMU
|
||||
FROM --platform=$BUILDPLATFORM base-build AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install all dependencies (including dev dependencies for build)
|
||||
|
||||
Reference in New Issue
Block a user