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"]