FROM node:18-alpine as build ARG DATABASE_DIRECT_URL ARG DATABASE_URL WORKDIR /calcom RUN set -eux; ENV NODE_ENV="production" ENV NODE_OPTIONS="--max-old-space-size=8192" ENV DATABASE_DIRECT_URL=${DATABASE_DIRECT_URL} ENV DATABASE_URL=${DATABASE_URL} COPY . . RUN yarn install # Build prisma schema and make sure that it is linked to v2 node_modules RUN yarn workspace @calcom/api-v2 run generate-schemas RUN rm -rf apps/api/v2/node_modules RUN yarn install RUN yarn workspace @calcom/api-v2 run build EXPOSE 80 CMD [ "yarn", "workspace", "@calcom/api-v2", "start:prod"]