File size: 747 Bytes
1eba0ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM node:20-slim

# Install git
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Clone the repository
RUN git clone https://github.com/vishalmysore/agentWorkBook.git .

# Install dependencies
RUN npm ci --only=production

# Create directory for Gun.js data
RUN mkdir -p radata-relay

# Expose port 7860 (Hugging Face Spaces default)
EXPOSE 7860

# Set environment variable for Hugging Face Spaces
ENV PORT=7860

# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
    CMD node -e "require('http').get('http://localhost:7860/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"

# Start the relay server
CMD ["node", "relay-server.js"]