File tree Expand file tree Collapse file tree 2 files changed +15
-18
lines changed Expand file tree Collapse file tree 2 files changed +15
-18
lines changed Original file line number Diff line number Diff line change 1- FROM oven/bun:1.2.5 AS base
2- WORKDIR /usr/src/ app
1+ FROM oven/bun:alpine AS builder
2+ WORKDIR /app
33
4- FROM base AS install
5- COPY package.json bun.lock ./
6- RUN bun install --frozen-lockfile --production
4+ COPY ./package.json ./bun.lock ./
5+ RUN bun install --frozen-lockfile
76
8-
9- FROM base AS prerelease
10- COPY --from=install /usr/src/app/node_modules node_modules
117COPY . .
12-
13- ENV NODE_ENV=production
14- RUN bun test
158RUN bun run build
169
17- FROM base AS release
18- COPY --from=install /usr/src/app/node_modules node_modules
19- COPY --from=prerelease /usr/src/app/dist/ .
10+ FROM oven/bun:alpine AS runner
11+ WORKDIR /app
12+
13+ COPY ./package.json ./bun.lock ./
14+ RUN bun install --frozen-lockfile --production --ignore-scripts --no-cache
15+
16+ COPY --from=builder /app/dist ./dist
17+
18+ EXPOSE 4141
2019
21- USER bun
22- EXPOSE 4141/tcp
23- ENTRYPOINT [ "bun" , "main.js" ]
20+ CMD ["bun" , "run" , "dist/main.js" ]
Original file line number Diff line number Diff line change 2727 "knip" : " knip-bun" ,
2828 "lint" : " eslint ." ,
2929 "prepack" : " bun run build" ,
30- "prepare" : " NODE_ENV=production || simple-git-hooks" ,
30+ "prepare" : " simple-git-hooks" ,
3131 "release" : " bumpp && bun publish --access public" ,
3232 "start" : " NODE_ENV=production bun run ./src/main.ts"
3333 },
You can’t perform that action at this time.
0 commit comments