27 lines
836 B
Plaintext
27 lines
836 B
Plaintext
|
FROM node:20 as base
|
||
|
ENV PNPM_HOME="/pnpm"
|
||
|
ENV PATH="$PNPM_HOME:$PATH"
|
||
|
WORKDIR /app
|
||
|
RUN corepack enable
|
||
|
|
||
|
FROM base as build
|
||
|
WORKDIR /usr/src/app
|
||
|
RUN mkdir -p /usr/src/app/packages/scout && mkdir /usr/src/app/packages/taco && mkdir -p /prod/scout
|
||
|
COPY package.json pnpm-lock.yaml .
|
||
|
COPY ./packages/scout/pnpm-lock.yaml ./packages/scout/
|
||
|
COPY ./packages/taco/pnpm-lock.yaml ./packages/taco/
|
||
|
COPY ./packages/types/pnpm-lock.yaml ./packages/types/
|
||
|
RUN pnpm fetch
|
||
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --recursive --frozen-lockfile
|
||
|
COPY ./packages/scout/ ./packages/scout/
|
||
|
COPY ./packages/taco/ ./packages/taco/
|
||
|
COPY ./packages/types/ ./packages/types/
|
||
|
RUN pnpm -r build
|
||
|
RUN pnpm deploy --filter=scout --prod /prod/scout
|
||
|
|
||
|
FROM base as scout
|
||
|
COPY --from=build /prod/scout .
|
||
|
RUN ls -la .
|
||
|
ENTRYPOINT ["pnpm", "start"]
|
||
|
|