Skip to content

Commit

Permalink
Merge pull request #3 from tfkhdyt/bundle
Browse files Browse the repository at this point in the history
perf(dockerfile): switch to bun
  • Loading branch information
tfkhdyt authored Sep 27, 2023
2 parents 27497a7 + 1541ba9 commit dc0d113
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM node:lts-alpine3.18
WORKDIR /app
FROM oven/bun AS builder
WORKDIR /src
COPY . .
# RUN npm i
# RUN npm run generate
# RUN npx tsx ./src/db/postgres/migrate.ts
# RUN rm -rf node_modules
RUN npm i --omit=dev
RUN bun i
RUN bun build --compile --outfile kbbi ./src/main.ts

ENTRYPOINT [ "npx", "tsx", "./src/main.ts" ]
FROM debian:unstable-slim
WORKDIR /app
COPY --from=builder /src/kbbi /app/kbbi
ENTRYPOINT [ "/app/kbbi" ]

0 comments on commit dc0d113

Please sign in to comment.