File size: 744 Bytes
4735fad
 
77cbaa0
 
 
4735fad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
076f531
 
4735fad
076f531
4735fad
 
 
e07d173
4735fad
 
b0b8ff0
 
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
34
35
FROM node:18-alpine

# Install git-lfs for LFS file support
RUN apk add --no-cache git-lfs && git lfs install

WORKDIR /app

# Copy package files
COPY client/package*.json ./client/
COPY server/package*.json ./server/

# Install dependencies
RUN cd client && npm install
RUN cd server && npm install

# Copy source code
COPY . .

# Build client and server
RUN cd client && npm run build
RUN cd server && npm run build

# Use existing node user (UID 1000 already exists in node:18-alpine)
RUN chown -R node:node /app

USER node

# Hugging Face Spaces uses port 7860, Render/Railway use PORT env
ENV PORT=7860
ENV NODE_ENV=production
EXPOSE 7860

# Start server (path changed due to rootDir: "..")
CMD ["node", "server/dist/server/src/index.js"]