2024-07-13 05:34:19 +02:00
|
|
|
FROM oven/bun:latest as build
|
2022-07-12 18:07:17 +02:00
|
|
|
WORKDIR /build/app
|
2024-07-12 14:58:58 +02:00
|
|
|
COPY api/package.json api/bun.lockb ./
|
2022-07-12 18:07:17 +02:00
|
|
|
COPY lib ../lib
|
2024-07-12 14:58:58 +02:00
|
|
|
RUN cd ../lib && bun install --frozen-lockfile && bun run build
|
|
|
|
RUN bun install --frozen-lockfile
|
2022-07-12 18:07:17 +02:00
|
|
|
COPY ./api .
|
2024-07-12 14:58:58 +02:00
|
|
|
RUN bun run build
|
2022-02-05 20:17:00 +01:00
|
|
|
|
2024-07-13 05:34:19 +02:00
|
|
|
FROM oven/bun:latest as prod
|
2022-07-12 18:07:17 +02:00
|
|
|
WORKDIR /app/api
|
2024-07-12 14:58:58 +02:00
|
|
|
COPY --from=build /build/app/package.json /build/app/bun.lockb ./
|
2022-07-12 18:07:17 +02:00
|
|
|
COPY --from=build /build/app/dist ./dist
|
2022-07-16 09:22:58 +02:00
|
|
|
COPY --from=build /build/lib ../lib
|
2024-07-12 14:58:58 +02:00
|
|
|
RUN bun install --production --frozen-lockfile
|
|
|
|
CMD ["bun", "start"]
|