mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 04:08:11 +00:00
Merge pull request #480 from Tria-plc/freight_feature/usermanagement
refactor contract handling to support single route per contract and i…
This commit is contained in:
@@ -17,10 +17,6 @@ RUN pnpm dlx turbo prune "@edr/freight-api" --docker
|
|||||||
FROM base AS installer
|
FROM base AS installer
|
||||||
COPY --from=pruner /app/out/json/ .
|
COPY --from=pruner /app/out/json/ .
|
||||||
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
|
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
|
||||||
# Puppeteer's bundled Chromium can't run on Alpine (glibc build). Skip its
|
|
||||||
# download here — the runner installs Alpine's system Chromium instead and we
|
|
||||||
# point PUPPETEER_EXECUTABLE_PATH at it.
|
|
||||||
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
|
||||||
RUN --mount=type=secret,id=npmrc,target=./.npmrc,required=false \
|
RUN --mount=type=secret,id=npmrc,target=./.npmrc,required=false \
|
||||||
--mount=type=cache,id=pnpm,target=/pnpm/store \
|
--mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
pnpm install --frozen-lockfile
|
pnpm install --frozen-lockfile
|
||||||
@@ -32,26 +28,12 @@ RUN pnpm turbo build --filter="@edr/freight-api..."
|
|||||||
|
|
||||||
FROM base AS deployer
|
FROM base AS deployer
|
||||||
COPY --from=builder /app/ .
|
COPY --from=builder /app/ .
|
||||||
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
pnpm deploy --filter="@edr/freight-api" --prod --legacy /deploy
|
pnpm deploy --filter="@edr/freight-api" --prod --legacy /deploy
|
||||||
|
|
||||||
FROM node:24.15.0-alpine AS runner
|
FROM node:24.15.0-alpine AS runner
|
||||||
# Chromium + fonts so puppeteer can render contract PDFs (HTML -> PDF). Without
|
RUN apk add --no-cache libc6-compat
|
||||||
# a working browser the PDF service falls back to an unstyled text-only PDF.
|
|
||||||
RUN apk add --no-cache \
|
|
||||||
libc6-compat \
|
|
||||||
chromium \
|
|
||||||
nss \
|
|
||||||
freetype \
|
|
||||||
harfbuzz \
|
|
||||||
ttf-freefont \
|
|
||||||
font-noto \
|
|
||||||
font-noto-cjk
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
# Point puppeteer at the system Chromium and stop it trying to download its own.
|
|
||||||
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
|
||||||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN addgroup --system --gid 1001 nodejs \
|
RUN addgroup --system --gid 1001 nodejs \
|
||||||
&& adduser --system --uid 1001 --ingroup nodejs nestjs
|
&& adduser --system --uid 1001 --ingroup nodejs nestjs
|
||||||
|
|||||||
Reference in New Issue
Block a user