File size: 627 Bytes
e666fa8
 
93d5654
 
 
e666fa8
93d5654
 
 
e666fa8
93d5654
e666fa8
 
 
93d5654
e666fa8
 
 
 
 
93d5654
 
e666fa8
 
 
 
 
 
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
FROM node:18-slim

# The node:18-slim image already has a user with UID 1000 (node)
# We'll use that user instead of creating a new one
USER node

# Set home to the node user's home directory
ENV HOME=/home/node \
    PATH=/home/node/.local/bin:$PATH

# Set the working directory
WORKDIR $HOME/app

# Copy package files with proper ownership
COPY --chown=node package*.json ./

# Install dependencies
RUN npm install

# Copy application files with proper ownership
COPY --chown=node proxy.js ./
COPY --chown=node README.md ./

# Expose port 7860 (HF Spaces default)
EXPOSE 7860

# Start the application
CMD ["node", "proxy.js"]