my-kaiqiuwang/dockerfile
kyuuseiryuu 6cf2d13a73 chore(docker): switch base image to dhi.io/bun:1-debian13-dev
Replace the previous base image 'oven/bun:latest' with 'dhi.io/bun:1-debian13-dev'.
This updates the underlying OS to Debian 13 and pins the Bun version for better consistency.
2026-03-25 01:17:25 +09:00

15 lines
379 B
Plaintext

FROM dhi.io/bun:1-debian13-dev
WORKDIR /app
COPY . .
# 1. 安装依赖并生成 Prisma Client (构建阶段只需生成类型)
RUN bun install
RUN bun prisma generate
# 暴露端口
EXPOSE 3000
# 2. 使用脚本或直接在启动时执行迁移
# 这样每次容器启动前都会检查并应用增量更新
ENTRYPOINT [ "sh", "-c", "bun prisma migrate deploy && bun start" ]