Move prisma command to Dockerfile (#270)

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 <me@lukevella.com>
This commit is contained in:
Matthew Precious 2022-08-01 06:36:34 -04:00 committed by GitHub
parent 90f1a1141b
commit 8aa63acf93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View file

@ -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"

View file

@ -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: