Spaces:
Sleeping

File size: 578 Bytes
995c7c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM node:20-slim

WORKDIR /app

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

# Copy package config files
COPY package*.json ./

# Install all dependencies (production & development for compilation)
RUN npm install

# Copy full source
COPY . .

# Build application (generates /dist and /dist/server.cjs)
RUN npm run build

# Configure default directory permissions
RUN mkdir -p /app/data && chmod -R 777 /app/data

# Expose Space port
EXPOSE 7860
ENV PORT=7860
ENV NODE_ENV=production

# Start container
CMD ["npm", "run", "start"]