Skip to content

Commit 79fcfc3

Browse files
committed
Fix Docker image
1 parent 06517f4 commit 79fcfc3

2 files changed

Lines changed: 12 additions & 6489 deletions

File tree

bot.Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
FROM node:24-slim AS base
22

3+
ENV PNPM_HOME="/pnpm"
4+
ENV PATH="$PNPM_HOME:$PATH"
5+
RUN corepack enable
36
COPY ./bingus-bot/ /app/bingus-bot/
47
COPY ./package*.json /app/
8+
COPY ./pnpm*.yaml /app/
59
WORKDIR /app
610

7-
RUN pnpm ci
11+
FROM base AS prod-deps
12+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
13+
14+
FROM base AS build
15+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
816
RUN pnpm run -w bingus-bot build
917

18+
FROM base
19+
COPY --from=prod-deps /app/node_modules /app/node_modules
20+
COPY --from=build /app/dist /app/dist
1021
CMD [ "pnpm", "-w", "bingus-bot", "start" ]

0 commit comments

Comments
 (0)