feat(channel): page details chaine multi-providers avec onglets et infinite scroll
CI / build-and-test (push) Successful in 13m34s

- Strategy Pattern front: ChannelProviderInterface + 6 providers (yt/dm/tw/pt/od/ru) + factory (ids longs/courts)
- ChannelContentService: cache par onglet/tri/recherche (TTL 5min), pagination nextPage
- ChannelPage: header (banniere/avatar/subs/description ...plus), tabs dynamiques par capabilities, grilles videos/shorts 9:16/playlists/live, recherche debounced, tri recent/populaire, infinite scroll IntersectionObserver, skeletons/empty/error
- Backend: GET /api/channels/:provider/:id/content (videos/shorts/playlists/live) natif par provider
This commit is contained in:
2026-09-25 10:15:12 -04:00
parent fe35340948
commit 97e5de74f5
147 changed files with 7954 additions and 77497 deletions
+14 -3
View File
@@ -4,6 +4,16 @@ FROM node:20-alpine
# Créez le répertoire de l'application
WORKDIR /app
# Dépendances système AVANT npm install :
# - `python` (+ lien symbolique python3→python) : requis par le preinstall
# de youtube-dl-exec (sinon "youtube-dl-exec needs Python" et build KO) ;
# - curl_cffi : bypass Cloudflare pour le scraper Rumble. Sans lui, les pages
# /search/* de Rumble retournent 403 "Just a moment" et les blocs Rumble des
# pages de thèmes restent vides.
RUN apk add --no-cache python3 py3-pip \
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& pip install --no-cache --break-system-packages curl_cffi
# D'abord, copiez uniquement les fichiers nécessaires pour l'installation
COPY package*.json ./
@@ -22,9 +32,10 @@ EXPOSE 4000
# Commande de démarrage
CMD ["node", "server/index.mjs"]
# Add a HEALTHCHECK for NGINX
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD curl -f http://localhost/ || exit 1
# L'API écoute sur $PORT (4000 par défaut) : le healthcheck doit la viser
# (l'ancienne forme `http://localhost/` visait le port 80 et restait unhealthy).
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD wget -q -O /dev/null http://localhost:4000/api/health || exit 1
# FROM nginx:alpine
+15 -8
View File
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
# -------------------- Build stage --------------------
FROM node:20-bullseye AS builder
FROM node:20-bookworm AS builder
WORKDIR /app
# Install dependencies
@@ -18,7 +18,7 @@ RUN npx ng build --configuration=production
RUN npm prune --omit=dev
# -------------------- Runtime stage --------------------
FROM node:20-bullseye-slim AS runner
FROM node:20-bookworm-slim AS runner
ENV NODE_ENV=production \
YOUTUBE_DL_SKIP_PYTHON_CHECK=1
WORKDIR /app
@@ -26,19 +26,26 @@ WORKDIR /app
# Create required runtime directories
RUN mkdir -p /app/db /app/tmp/downloads
# youtube-dl-exec (yt-dlp) requires Python at runtime
# youtube-dl-exec (yt-dlp) requires Python at runtime.
# curl_cffi is required by yt-dlp impersonation AND by the Rumble provider's
# Cloudflare bypass helper (server/providers/rumble_fetch.py).
RUN apt-get update \
&& apt-get install -y --no-install-recommends python3 python-is-python3 ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
&& apt-get install -y --no-install-recommends python3 python-is-python3 python3-pip ca-certificates curl \
&& rm -rf /var/lib/apt/lists/* \
&& python3 -m pip install --no-cache-dir --break-system-packages curl_cffi 2>/dev/null \
|| python3 -m pip install --no-cache-dir curl_cffi
# Copy runtime server and built frontend
COPY --from=builder /app/server ./server
COPY --from=builder /app/dist ./dist
# Copy only the DB schema; the actual DB file will be created on first run
# Copy the DB schema AND migrations; the actual DB file will be created on first run
COPY --from=builder /app/db/schema.sql ./db/schema.sql
## Also copy schema to an immutable location that won't be shadowed by a bind mount
RUN mkdir -p /app/db-schema
COPY --from=builder /app/db/migrations ./db/migrations
## Also copy schema+migrations to an immutable location that won't be shadowed
## by a bind/named volume mounted on /app/db
RUN mkdir -p /app/db-schema /app/db-migrations
COPY --from=builder /app/db/schema.sql /app/db-schema/schema.sql
COPY --from=builder /app/db/migrations /app/db-migrations/
# Copy production dependencies from builder
COPY --from=builder /app/node_modules ./node_modules