Files
zkldi_Tachi/docker/Dockerfile.bot
T
2026-05-03 15:04:24 +00:00

31 lines
595 B
Docker

# Build context must be the repo root. Full tree + .dockerignore (see repo root).
# docker build -f docker/Dockerfile.bot .
FROM oven/bun:alpine AS base
WORKDIR /app
FROM base AS deps
COPY . .
RUN bun install --frozen-lockfile
FROM deps AS build
RUN bun build \
--compile \
--target=bun \
./typescript/bot/src/main.ts \
--outfile /bot
# --- prod: nothing but the binary ---
FROM alpine:3.21 AS prod
RUN apk add --no-cache curl
COPY --from=build /bot /bot
HEALTHCHECK --interval=15s --timeout=5s \
CMD curl -sf http://localhost:${PORT:-8080}/.deploy/up || exit 1
CMD ["/bot"]