Skip to content

Commit

Permalink
chore(api): update dockerfile entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Feb 3, 2024
1 parent 9b0e414 commit 3962beb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM node:20-alpine AS build

WORKDIR /app

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

COPY package.json .
Expand All @@ -11,9 +12,14 @@ RUN pnpm install

COPY apps/api apps/api

COPY apps/api/startup.sh .
RUN chmod +x startup.sh

RUN ls -la

RUN pnpm run db:generate-types
RUN pnpm run build:api

EXPOSE 4200

ENTRYPOINT ["pnpm", "run", "start:api"]
ENTRYPOINT ["/bin/bash", "startup.sh"]
4 changes: 4 additions & 0 deletions apps/api/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/bash

pnpm run db:deploy-migrations
pnpm run start:api

0 comments on commit 3962beb

Please sign in to comment.