chore: 添加 Docker 打包和 Compose 编排支持

This commit is contained in:
2026-04-02 02:43:21 +08:00
parent 9175909033
commit ed770909ef
4 changed files with 74 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
FROM oven/bun:1 AS build
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run build \
&& bun run compile \
&& mv out/server-* out/server
FROM gcr.io/distroless/cc-debian13:nonroot
COPY --from=build --chown=nonroot:nonroot /app/out/server /app/server
ENV HOST=0.0.0.0
EXPOSE 3000
CMD ["/app/server"]