27 lines
581 B
Plaintext
27 lines
581 B
Plaintext
|
FROM node:20-alpine AS base
|
||
|
ENV PNPM_HOME="/pnpm"
|
||
|
ENV PATH="$PNPM_HOME:$PATH"
|
||
|
RUN corepack enable
|
||
|
RUN apk update
|
||
|
|
||
|
|
||
|
FROM base AS build
|
||
|
ENV NODE_ENV=production
|
||
|
COPY . /usr/src/app
|
||
|
WORKDIR /usr/src/app
|
||
|
RUN mkdir -p /prod/scout
|
||
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||
|
RUN ls -la ./packages
|
||
|
RUN pnpm deploy --filter=@futureporn/scout --prod /prod/scout
|
||
|
# COPY pnpm-lock.yaml ./
|
||
|
# RUN pnpm fetch
|
||
|
# COPY ./packages/scout /app
|
||
|
|
||
|
|
||
|
FROM base AS scout
|
||
|
COPY --from=build /prod/scout /app
|
||
|
WORKDIR /app
|
||
|
RUN ls -la
|
||
|
ENTRYPOINT ["pnpm"]
|
||
|
CMD ["run", "start"]
|