Files
buzz/backend.dockerfile
T
dmgnr 6104b420c0 refactor: remove PageTransition component and adjust TierlistSelectionPage layout
feat: add card caching and database seeding functionality

chore: update biome schema version and adjust linting rules

fix: correct table reference handling in cdnReferences view

feat: implement card API endpoint for fetching and caching character cards

chore: update dependencies and remove unused framer-motion package

chore: enhance Docker setup with health checks and improved service definitions

fix: ensure proper handling of admin account creation during database seeding

style: enforce stricter TypeScript checks and improve code readability
2026-02-02 00:10:25 +07:00

44 lines
974 B
Docker

# syntax=docker/dockerfile:1.4
### Stage 1: deps ###
FROM oven/bun:canary-alpine AS deps
WORKDIR /home/container
COPY package*.json bun.lock ./
COPY patches ./patches
# Install into cache, then persist into real node_modules
RUN --mount=type=cache,target=/root/.bun bun install --frozen-lockfile
### Stage 2: builder ###
FROM oven/bun:canary-alpine AS builder
# Isolation
RUN adduser -Du 1001 container
USER container
WORKDIR /home/container
# Reuse deps
COPY --from=deps /home/container/node_modules ./node_modules
COPY --from=deps /home/container/package*.json ./
COPY --from=deps /home/container/bun.lock ./
# App source
COPY --chown=1001 . .
RUN bun build --target bun --production --bytecode backend --outdir=dist
### Stage 3: runner ###
FROM oven/bun:canary-alpine AS runner
# Isolation
RUN adduser -Du 1001 container
USER container
WORKDIR /home/container
COPY --chown=1001 .env* .
COPY --from=builder /home/container/dist/backend/* ./
CMD ["bun", "."]