FROM oven/bun:1 as install
RUN mkdir -p /temp/prod
COPY . /temp/prod
RUN cd /temp/prod && bun install --production --frozen-lockfile && bun run build
FROM nginx AS release
COPY --from=install /temp/prod/dist /usr/share/nginx/html