Initial commit
This commit is contained in:
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
FROM oven/bun AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package.json
|
||||
COPY bun.lock bun.lock
|
||||
|
||||
RUN bun install
|
||||
|
||||
COPY ./src ./src
|
||||
|
||||
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=build /app/server server
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
CMD ["./server"]
|
||||
|
||||
EXPOSE 3000
|
Reference in New Issue
Block a user