Enhance Dockerfile and API for yt-dlp integration
- Install Deno as a JavaScript runtime for yt-dlp in the Dockerfile. - Add configuration for yt-dlp to support cookies and JavaScript runtime selection. - Update API to handle cookies for YouTube bot detection and allow specifying the JavaScript runtime. - Introduce new environment variables for cookie management and JavaScript runtime configuration in README.
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -3,15 +3,25 @@ FROM node:20-alpine
|
||||
# Set default locale to German
|
||||
ENV LOCALE=de
|
||||
|
||||
# yt-dlp und ffmpeg installieren
|
||||
# yt-dlp, ffmpeg und deno (JavaScript Runtime für YouTube) installieren
|
||||
RUN apk add --no-cache \
|
||||
python3 \
|
||||
py3-pip \
|
||||
ffmpeg \
|
||||
&& pip3 install --no-cache-dir --break-system-packages yt-dlp
|
||||
curl \
|
||||
unzip \
|
||||
&& pip3 install --no-cache-dir --break-system-packages yt-dlp \
|
||||
&& curl -fsSL https://deno.land/install.sh | sh \
|
||||
&& mv /root/.deno/bin/deno /usr/local/bin/deno \
|
||||
&& chmod +x /usr/local/bin/deno
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# yt-dlp Konfiguration erstellen (für deno als JS-Runtime)
|
||||
RUN mkdir -p /root/.config/yt-dlp && \
|
||||
echo "--js-runtimes deno" > /root/.config/yt-dlp/config && \
|
||||
echo "--no-warnings" >> /root/.config/yt-dlp/config
|
||||
|
||||
# Package-Dateien kopieren und Dependencies installieren
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
Reference in New Issue
Block a user