chore: dockerfile

This commit is contained in:
2025-09-19 20:21:48 +02:00
parent d9a7e85514
commit fb2e7dad12
2 changed files with 25 additions and 1 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM oven/bun:latest AS builder
WORKDIR /app
COPY package.json bun.lockb* ./
RUN bun install
COPY . .
RUN bun run build
RUN bunx prisma generate
FROM oven/bun:latest
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/package.json ./
CMD ["sh", "-c", "bunx prisma migrate deploy && bun run ."]

View File

@@ -6,7 +6,7 @@
"main": "dist/index.js",
"scripts": {
"build": "sern build",
"start": "bunx prisma generate && bunx prisma migrate deploy && bun run .",
"start": "bunx prisma migrate deploy && bun run .",
"install": "sern build",
"commands:publish": "sern commands publish",
"dev": "sern build -w --watch-command \"bun start\""