Update Dockerfile to install prisma globally
Prisma is a dev dependency in the main project. However, it is needed in the image so we can run the migrations before starting the server up. This installs it globally in the image since it won't be installed using the project's `package.json`. Signed-off-by: Alex Sears <me@alexsears.com>
This commit is contained in:
@@ -30,7 +30,10 @@ RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
|
||||
FROM node:14 as runner
|
||||
WORKDIR /calcom
|
||||
ENV NODE_ENV production
|
||||
RUN apt-get update && apt-get -y install netcat && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && \
|
||||
apt-get -y install netcat && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
npm install --global prisma
|
||||
|
||||
COPY calendso/package.json calendso/yarn.lock calendso/turbo.json ./
|
||||
COPY --from=builder /calcom/node_modules ./node_modules
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
set -x
|
||||
|
||||
/calcom/scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "database is up"
|
||||
# npx prisma migrate deploy --schema /calcom/packages/prisma/schema.prisma
|
||||
npx prisma migrate deploy --schema /calcom/packages/prisma/schema.prisma
|
||||
yarn start
|
||||
|
||||
Reference in New Issue
Block a user