File size: 864 Bytes
dd480ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM node:20-slim

# Install pnpm
RUN npm install -g pnpm

WORKDIR /app

# 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 && pnpm install && ./node_modules/.bin/tsc

# Hugging Face Spaces run on port 7860 by default
EXPOSE 7860

# Set environment variables
ENV PORT=7860
ENV NODE_ENV=production

# Ensure the correct entry point is used
# Based on the original Dockerfile: CMD ["node", "apps/simulator/dist/apps/simulator/src/index.js"]
# But we need to make sure the path is correct after build
CMD ["node", "apps/simulator/dist/apps/simulator/src/index.js"]