FROM node:20-alpine WORKDIR /app # Install dependencies at the root COPY package*.json ./ COPY apps/server/package*.json ./apps/server/ COPY apps/web/package*.json ./apps/web/ RUN npm install # Copy source and prisma COPY apps/server ./apps/server # Generate Prisma client WORKDIR /app/apps/server RUN npx prisma generate # Build server RUN npm run build # Make start script executable RUN chmod +x ./start.sh EXPOSE 3001 # Run the server using the start script CMD ["./start.sh"]