fp/d.bot.dockerfile

21 lines
450 B
Plaintext
Raw Normal View History

2024-06-12 04:28:36 +00:00
FROM node:20 AS base
2024-05-27 22:20:58 +00:00
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
FROM base AS build
ENV NODE_ENV=production
2024-07-06 08:49:51 +00:00
COPY ./packages/bot /usr/src/app
2024-05-27 22:20:58 +00:00
WORKDIR /usr/src/app
RUN mkdir -p /prod/scout
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
2024-07-06 08:49:51 +00:00
RUN pnpm deploy --filter=bot --prod /prod/scout
2024-05-27 22:20:58 +00:00
2024-06-12 04:28:36 +00:00
2024-07-06 08:49:51 +00:00
FROM base AS bot
COPY --from=build /prod/bot /app
2024-06-12 04:28:36 +00:00
WORKDIR /app
ENTRYPOINT ["pnpm"]
2024-07-06 08:49:51 +00:00
CMD ["run", "start"]