41 lines
		
	
	
		
			856 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			856 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM node:22
 | 
						|
 | 
						|
# Set working directory
 | 
						|
WORKDIR /app
 | 
						|
 | 
						|
# Install system-level dependencies
 | 
						|
RUN apt-get update -y && \
 | 
						|
    apt-get install -y --no-install-recommends \
 | 
						|
        build-essential \
 | 
						|
        git \
 | 
						|
        inotify-tools \
 | 
						|
        ffmpeg \
 | 
						|
        mktorrent \
 | 
						|
        python3 \
 | 
						|
        python3-pip \
 | 
						|
        python3-venv \
 | 
						|
    && apt-get clean && rm -rf /var/lib/apt/lists/*
 | 
						|
 | 
						|
# Install IPFS Kubo
 | 
						|
COPY --from=ipfs/kubo:v0.36.0 /usr/local/bin/ipfs /usr/local/bin/ipfs
 | 
						|
 | 
						|
# Copy and install dependencies
 | 
						|
COPY package.json package-lock.json ./
 | 
						|
RUN npm install --ignore-scripts=false --foreground-scripts --verbose
 | 
						|
 | 
						|
# Copy Prisma schema and generate client
 | 
						|
COPY prisma ./prisma
 | 
						|
RUN npx prisma generate
 | 
						|
 | 
						|
# Copy the rest of the code
 | 
						|
COPY . .
 | 
						|
 | 
						|
# Build the app
 | 
						|
RUN npm run build
 | 
						|
 | 
						|
# Expose the port
 | 
						|
EXPOSE 5000
 | 
						|
 | 
						|
# Start the app
 | 
						|
CMD ["npm", "run", "start:server"]
 |