FROM node:20-slim WORKDIR /app # Install pnpm RUN npm install -g pnpm # Copy all package.json files for dependency installation COPY package.json pnpm-lock.yaml* ./ COPY apps/simulator/package.json ./apps/simulator/ COPY apps/worker/package.json ./apps/worker/ # Install all dependencies in the monorepo RUN pnpm install # Copy the rest of the monorepo files COPY . . # Build the simulator service RUN cd apps/simulator && npm install && ./node_modules/.bin/tsc EXPOSE 7860 # Ensure the correct entry point is used CMD ["node", "apps/simulator/dist/apps/simulator/src/index.js"]