mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Use bun build in the dockerfile
This commit is contained in:
parent
ce242bf1b4
commit
87314a0e96
@ -1,15 +1,28 @@
|
|||||||
FROM oven/bun
|
FROM oven/bun AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json .
|
COPY package.json bun.lock .
|
||||||
COPY bun.lock .
|
|
||||||
RUN bun install --production
|
RUN bun install --production
|
||||||
|
|
||||||
COPY src src
|
COPY src src
|
||||||
|
COPY drizzle drizzle
|
||||||
COPY tsconfig.json .
|
COPY tsconfig.json .
|
||||||
COPY drizzle drizzle
|
|
||||||
COPY drizzle drizzle
|
|
||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV=production
|
||||||
|
RUN bun build \
|
||||||
|
--compile \
|
||||||
|
--minify-whitespace \
|
||||||
|
--minify-syntax \
|
||||||
|
--target bun \
|
||||||
|
--outfile server \
|
||||||
|
./src/index.ts
|
||||||
|
|
||||||
|
FROM gcr.io/distroless/base
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=builder /app/server server
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["bun", "src/index.ts"]
|
CMD ["./server"]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user