Skip to content

Commit

Permalink
fix: docker api build
Browse files Browse the repository at this point in the history
  • Loading branch information
kriptonian1 committed Feb 25, 2024
1 parent e0d0c12 commit c2a92b4
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ ARG SENTRY_ENVIRONMENT=${SENTRY_ENVIRONMENT}
ARG SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
ARG DATABASE_URL=${DATABASE_URL}

RUN apk add --no-cache bash
RUN npm i -g pnpm

COPY package.json .
Expand All @@ -18,26 +17,16 @@ COPY pnpm-workspace.yaml .
COPY apps/api/package.json apps/api/package.json
COPY apps/api/tsconfig.json apps/api/tsconfig.json

COPY apps/api/src apps/api/src

COPY packages packages

RUN pnpm install

RUN cd apps/api && pnpm install
RUN cd ../../

COPY apps/api apps/api

RUN pnpm db:generate-types
RUN pnpm build:api
# RUN pnpm sourcemaps:api
RUN pnpm db:deploy-migrations

FROM node:20-alpine as production

WORKDIR /app

COPY --from=build /app/apps/api/dist/ /app
RUN pnpm sourcemaps:api

EXPOSE 4200

ENTRYPOINT ["node" "dist/main"]
ENTRYPOINT ["node", "apps/api/dist/main.js"]

0 comments on commit c2a92b4

Please sign in to comment.