creating contenerization

This commit is contained in:
rafiarrafif
2025-05-23 20:46:47 +07:00
parent be493b08ef
commit b8b5182911
14 changed files with 1013 additions and 37 deletions

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
# --- Stage 1: Build ---
FROM oven/bun:1.1 AS builder
WORKDIR /app
COPY bun.lockb package.json ./
RUN bun install
COPY . .
RUN bunx prisma generate
RUN bun run build
# --- Stage 2: Production Runner ---
FROM oven/bun:1.1 AS runner
WORKDIR /app
COPY --from=builder /app ./
RUN bunx prisma migrate deploy
EXPOSE 3000
CMD [ "sh", "-c", "PORT=3000 ./dist/server" ]