From 8aa63acf9384eb7dfbc88a7bec4d49f88a2a0375 Mon Sep 17 00:00:00 2001 From: Matthew Precious Date: Mon, 1 Aug 2022 06:36:34 -0400 Subject: [PATCH] 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 --- Dockerfile | 2 +- docker-compose.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c0933cd97..03d0af2ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,4 +24,4 @@ WORKDIR /usr/src/app COPY --from=build /app . -CMD [ "yarn", "start" ] \ No newline at end of file +CMD sh -c "yarn prisma migrate deploy --schema prisma/schema.prisma && yarn start" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0d3e794d0..cf4d9d88b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: