fp/packages/bot/Dockerfile

20 lines
370 B
Docker
Raw Normal View History

FROM node:20-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
WORKDIR /app
RUN corepack enable
FROM base AS build
COPY ./packages/bot/package.json ./
COPY ./packages/bot/src ./
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install
FROM build AS dev
ENTRYPOINT ["pnpm"]
CMD ["run", "dev"]
FROM build AS run
ENTRYPOINT ["pnpm"]
CMD ["start"]