Skip to content

Commit

Permalink
ci: updating dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
aacevski committed Feb 15, 2025
1 parent 3977931 commit b4dfef5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ FROM base AS all-deps
RUN bun install

FROM base AS prod-deps
RUN bun install
RUN bun install --production

FROM all-deps AS build
ENV NODE_ENV=production

COPY ./apps/api ./apps/api
COPY packages/typescript-config ./packages/typescript-config
COPY apps/api ./apps/api

FROM oven/bun:alpine AS runtime
WORKDIR /app

COPY --from=prod-deps /app/node_modules ./node_modules

COPY --from=build /app/packages ./packages
COPY --from=build /app/apps/api ./apps/api

ENV NODE_ENV=production
Expand All @@ -32,4 +33,4 @@ WORKDIR /app/apps/api

EXPOSE 1337

CMD ["bun", "run", "src/index.ts"]
CMD ["bun", "run", "src/index.ts"]

0 comments on commit b4dfef5

Please sign in to comment.