Phoe2004 commited on
Commit
75f00ac
·
verified ·
1 Parent(s): 883b331

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +54 -0
Dockerfile ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # System deps + deno (yt-dlp JS challenge solver) + chromium (for potential browser needs)
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ ffmpeg \
6
+ git \
7
+ curl \
8
+ unzip \
9
+ chromium \
10
+ chromium-driver \
11
+ libass9 \
12
+ libass-dev \
13
+ fontconfig \
14
+ wget \
15
+ && curl -fsSL https://deno.land/install.sh | sh \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ ENV DENO_INSTALL="/root/.deno"
19
+ ENV PATH="$DENO_INSTALL/bin:$PATH"
20
+
21
+ # Set chromium path for yt-dlp
22
+ ENV CHROME_PATH="/usr/bin/chromium"
23
+ ENV CHROMIUM_PATH="/usr/bin/chromium"
24
+
25
+ WORKDIR /app
26
+
27
+ # Install Python dependencies (lightweight - no torch/whisper needed for simple repost)
28
+ COPY requirements.txt .
29
+ RUN pip install --no-cache-dir -r requirements.txt
30
+
31
+ # Install yt-dlp with all dependencies
32
+ RUN pip install --no-cache-dir -U "yt-dlp[default,curl-cffi]"
33
+
34
+ # Create necessary directories
35
+ RUN mkdir -p downloads logs cookies state
36
+
37
+ # Copy application files
38
+ COPY app.py .
39
+ COPY cookies.txt ./cookies/tiktok.txt
40
+
41
+ # Optional: YouTube cookies (if you have them)
42
+ COPY m_youtube_com_cookies.txt ./cookies/youtube.txt 2>/dev/null || true
43
+
44
+ # Create start script
45
+ RUN echo '#!/bin/bash\n\
46
+ echo "🚀 Starting bot..."\n\
47
+ python app.py\n\
48
+ ' > start.sh && chmod +x start.sh
49
+
50
+ # Deno version check
51
+ RUN deno --version && yt-dlp --version
52
+
53
+ EXPOSE 7860
54
+ CMD ["./start.sh"]