Files
lbf-bot/apps/discord-bot/Dockerfile
Pihkaal 1c2d09cafc
All checks were successful
Build and Deploy / typecheck (push) Successful in 34s
Build and Deploy / build (push) Successful in 31s
Build and Deploy / deploy (push) Successful in 2s
fix: rename workflow to deploy, and parse git rev in the dockerfile
2026-06-01 22:23:41 +02:00

25 lines
689 B
Docker

FROM alpine AS git-sha
RUN apk add --no-cache git
COPY .git .git
RUN git rev-parse --short HEAD > /commit_sha
FROM node:22-alpine
WORKDIR /app
RUN corepack enable && corepack prepare pnpm@10.24.0 --activate
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY packages/utils ./packages/utils
COPY packages/database ./packages/database
COPY apps/discord-bot ./apps/discord-bot
RUN pnpm install --frozen-lockfile
RUN pnpm --filter @lbf-bot/utils run build
RUN pnpm --filter @lbf-bot/database run build
RUN pnpm --filter @lbf/discord-bot run build
COPY --from=git-sha /commit_sha /commit_sha
CMD export COMMIT_SHA=$(cat /commit_sha) && exec node apps/discord-bot/dist/index.js