Files
yt/Dockerfile
Peter Meier a8f822807d 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.
2025-12-22 12:58:09 +01:00

41 lines
933 B
Docker

FROM node:20-alpine
# Set default locale to German
ENV LOCALE=de
# yt-dlp, ffmpeg und deno (JavaScript Runtime für YouTube) installieren
RUN apk add --no-cache \
python3 \
py3-pip \
ffmpeg \
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
# Rest der Anwendung kopieren
COPY . .
# Build durchführen
RUN npm run build
# Port freigeben
EXPOSE 4321
# Start-Befehl
CMD ["node", "./dist/server/entry.mjs"]