Skip to content

Commit

Permalink
Move prisma command to Dockerfile (lukevella#270)
Browse files Browse the repository at this point in the history
This is required for a successful startup, so this makes it the
default command rather than requiring it to be overridden in the
compose file.

Co-authored-by: Luke Vella <[email protected]>
  • Loading branch information
mattprecious and lukevella authored Aug 1, 2022
1 parent 90f1a11 commit 8aa63ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ WORKDIR /usr/src/app

COPY --from=build /app .

CMD [ "yarn", "start" ]
CMD sh -c "yarn prisma migrate deploy --schema prisma/schema.prisma && yarn start"
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ services:
args:
- DATABASE_URL=postgres://postgres:postgres@rallly_db:5432/db?pgbouncer=true
restart: always
command: sh -c "yarn prisma migrate deploy --schema prisma/schema.prisma && yarn start"
depends_on:
- rallly_db
ports:
Expand Down

0 comments on commit 8aa63ac

Please sign in to comment.