File tree Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 1- FROM oven/bun:slim
1+ FROM oven/bun:1.2.5 AS base
2+ WORKDIR /usr/src/app
23
3- WORKDIR /app
4+ FROM base AS install
5+ COPY package.json bun.lock ./
6+ RUN bun install --frozen-lockfile --production
47
5- COPY package*.json ./
68
7- RUN bun install
8-
9- COPY src ./src
10- COPY tsconfig.json ./
11-
12- EXPOSE 4141
9+ FROM base AS prerelease
10+ COPY --from=install /usr/src/app/node_modules node_modules
11+ COPY . .
1312
1413ENV NODE_ENV=production
14+ RUN bun test
15+ RUN bun run build
16+
17+ FROM base AS release
18+ COPY --from=install /usr/src/app/node_modules node_modules
19+ COPY --from=prerelease /usr/src/app/dist/ .
1520
16- CMD ["bun" , "run" , "start" ]
21+ USER bun
22+ EXPOSE 4141/tcp
23+ ENTRYPOINT [ "bun" , "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" : " simple-git-hooks" ,
30+ "prepare" : " NODE_ENV=production || 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