bigbossmonster commited on
Commit
9ac20fc
·
verified ·
1 Parent(s): 0226d11

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a Node.js base image
2
+ FROM node:20-slim
3
+
4
+ # Install system dependencies for yt-dlp and ffmpeg
5
+ RUN apt-get update && apt-get install -y \
6
+ python3 \
7
+ python3-pip \
8
+ ffmpeg \
9
+ curl \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Install yt-dlp binary
13
+ RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp \
14
+ && chmod a+rx /usr/local/bin/yt-dlp
15
+
16
+ # Set working directory
17
+ WORKDIR /app
18
+
19
+ # Install dependencies
20
+ COPY package*.json ./
21
+ RUN npm install
22
+
23
+ # Copy application code
24
+ COPY . .
25
+
26
+ # HF Spaces default port is 7860
27
+ ENV PORT=7860
28
+ EXPOSE 7860
29
+
30
+ # Run with tsx to handle your imports/aliases
31
+ CMD ["npx", "tsx", "--tsconfig", "jsconfig.json", "server.js"]