Files
backend/Dockerfile

23 lines
660 B
Docker

# Build stage - install dependencies
FROM registry.odit.services/hub/oven/bun:1.3.9-alpine AS build
WORKDIR /app
COPY package.json bun.lockb* ./
RUN bun install --frozen-lockfile
# Production dependencies only
RUN rm -rf /app/node_modules \
&& bun install --production --frozen-lockfile
# Final image - run TypeScript directly
FROM registry.odit.services/hub/oven/bun:1.3.9-alpine AS final
WORKDIR /app
COPY --from=build /app/package.json /app/package.json
COPY --from=build /app/bun.lockb* /app/
COPY --from=build /app/node_modules /app/node_modules
COPY ormconfig.js bunfig.toml tsconfig.json ./
COPY src ./src
ENTRYPOINT ["bun", "/app/src/app.ts"]