meh, skip buildl
Some checks failed
CI / build-and-test (push) Failing after 2m27s

This commit is contained in:
Tobias Klemp
2026-01-02 01:42:59 +01:00
parent 0085aa690f
commit 6707f4d93a
2 changed files with 19 additions and 9 deletions

View File

@@ -3,7 +3,14 @@
FROM oven/bun:1 AS base
WORKDIR /usr/src/app
# install dependencies into temp directory
# this will cache them and speed up future builds
FROM base AS install
RUN mkdir -p /temp/dev
COPY package.json bun.lock /temp/dev/
RUN cd /temp/dev && bun install --frozen-lockfile
# install with --production (exclude devDependencies)
RUN mkdir -p /temp/prod
COPY package.json bun.lock /temp/prod/
RUN cd /temp/prod && bun install --frozen-lockfile --production
@@ -11,12 +18,14 @@ RUN cd /temp/prod && bun install --frozen-lockfile --production
# copy node_modules from temp directory
# then copy all (non-ignored) project files into the image
FROM base AS prerelease
COPY --from=install /temp/prod/node_modules node_modules
COPY --from=install /temp/dev/node_modules node_modules
COPY . .
# build
ENV NODE_ENV=production
RUN bun --bun run build
# copy production dependencies and source code into final image
FROM base AS release
COPY --from=install /temp/prod/node_modules node_modules
COPY --from=prerelease /usr/src/app/build .