mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-30 10:46:35 +02:00
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:
parent
90f1a1141b
commit
8aa63acf93
2 changed files with 1 additions and 2 deletions
|
@ -24,4 +24,4 @@ WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY --from=build /app .
|
COPY --from=build /app .
|
||||||
|
|
||||||
CMD [ "yarn", "start" ]
|
CMD sh -c "yarn prisma migrate deploy --schema prisma/schema.prisma && yarn start"
|
|
@ -14,7 +14,6 @@ services:
|
||||||
args:
|
args:
|
||||||
- DATABASE_URL=postgres://postgres:postgres@rallly_db:5432/db?pgbouncer=true
|
- DATABASE_URL=postgres://postgres:postgres@rallly_db:5432/db?pgbouncer=true
|
||||||
restart: always
|
restart: always
|
||||||
command: sh -c "yarn prisma migrate deploy --schema prisma/schema.prisma && yarn start"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- rallly_db
|
- rallly_db
|
||||||
ports:
|
ports:
|
||||||
|
|
Loading…
Add table
Reference in a new issue