Files
site-profile/Dockerfile
Alex Lebens 1f2820e4b4
Some checks failed
test-build / guarddog (push) Successful in 19s
renovate / renovate (push) Successful in 53s
test-build / build (push) Failing after 1m20s
feat: convert to bun
2026-03-11 01:03:51 -05:00

31 lines
727 B
Docker

FROM dhi.io/bun:1.3.10-debian13-dev AS builder
WORKDIR /app
COPY package.json bun.lock ./
FROM builder AS prod-deps
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
bun install --production --frozen-lockfile
FROM builder AS build-deps
RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
bun install --frozen-lockfile
FROM build-deps AS build
COPY . .
RUN bun run build
FROM dhi.io/bun:1.3.10-alpine3.22 AS runtime
WORKDIR /app
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
LABEL version="3.1.0"
LABEL description="Astro based personal website"
ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE $PORT
CMD ["bun", "run", "./dist/server/entry.mjs"]