mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix build errors on passenger api
This commit is contained in:
@@ -30,10 +30,8 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store\
|
|||||||
pnpm install --frozen-lockfile
|
pnpm install --frozen-lockfile
|
||||||
FROM deps AS build
|
FROM deps AS build
|
||||||
COPY . .
|
COPY . .
|
||||||
# ENV CI=true
|
|
||||||
|
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
RUN find . -name "main.js"
|
|
||||||
|
|
||||||
FROM base AS freight-api
|
FROM base AS freight-api
|
||||||
# RUN corepack enable && corepack prepare pnpm@9.12.0 --activate
|
# RUN corepack enable && corepack prepare pnpm@9.12.0 --activate
|
||||||
@@ -55,8 +53,11 @@ FROM base AS passenger-api
|
|||||||
WORKDIR /app/apps/edr-passenger-api
|
WORKDIR /app/apps/edr-passenger-api
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
COPY --from=deps /app/node_modules ./../../node_modules
|
# Use build-stage node_modules (not deps): `pnpm run build` runs `prisma generate`, which
|
||||||
COPY --from=deps /app/apps/edr-passenger-api/node_modules ./node_modules
|
# writes the real @prisma/client (enums, types). deps never runs generate, so @IsEnum(ServiceClass)
|
||||||
|
# and similar would see undefined at runtime if we copied deps only.
|
||||||
|
COPY --from=build /app/node_modules ./../../node_modules
|
||||||
|
COPY --from=build /app/apps/edr-passenger-api/node_modules ./node_modules
|
||||||
COPY --from=build /app/apps/edr-passenger-api/dist ./dist
|
COPY --from=build /app/apps/edr-passenger-api/dist ./dist
|
||||||
COPY --from=build /app/apps/edr-passenger-api/package.json ./package.json
|
COPY --from=build /app/apps/edr-passenger-api/package.json ./package.json
|
||||||
COPY --from=build /app/packages ./../../packages
|
COPY --from=build /app/packages ./../../packages
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/nest-cli",
|
||||||
"collection": "@nestjs/schematics",
|
"collection": "@nestjs/schematics",
|
||||||
"sourceRoot": "src",
|
"sourceRoot": "src",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"deleteOutDir": true,
|
||||||
"plugins": ["@nestjs/swagger"],
|
"plugins": ["@nestjs/swagger"],
|
||||||
"tsConfigPath": "tsconfig.build.json",
|
"tsConfigPath": "tsconfig.build.json",
|
||||||
"watchAssets": true
|
"watchAssets": true
|
||||||
|
|||||||
Reference in New Issue
Block a user