forked from imbytecat/fullstack-starter
chore: 添加 Docker 打包和 Compose 编排支持
This commit is contained in:
+20
@@ -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"]
|
||||
Reference in New Issue
Block a user