akborana4 commited on
Commit
08c5bfc
·
verified ·
1 Parent(s): 3b3d438

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -10
Dockerfile CHANGED
@@ -12,11 +12,7 @@ RUN npm run build
12
  FROM node:18-alpine AS server
13
  WORKDIR /app/server
14
 
15
- # Install Python, pip and ffmpeg, then try to install yt-dlp from apk repos.
16
- # Fallback order:
17
- # 1) apk install yt-dlp
18
- # 2) apk install yt-dlp-core
19
- # 3) pip install yt-dlp
20
  RUN apk add --no-cache python3 py3-pip ffmpeg \
21
  && (apk add --no-cache yt-dlp || apk add --no-cache yt-dlp-core || python3 -m pip install --no-cache-dir -U yt-dlp) \
22
  && yt-dlp --version
@@ -33,11 +29,10 @@ COPY --from=client /app/client/dist ../client/dist
33
  # Environment
34
  ENV NODE_ENV=production
35
  ENV PORT=3000
36
- # Optional: path to cookies file in Netscape format for yt-dlp
37
- # e.g. YT_COOKIES=/data/cookies.txt
38
- # ENV YT_COOKIES=""
39
 
40
- # Show yt-dlp version at container start for debugging
41
- CMD echo "yt-dlp version:" && yt-dlp --version && npm start
42
 
43
  EXPOSE 3000
 
12
  FROM node:18-alpine AS server
13
  WORKDIR /app/server
14
 
15
+ # Install Python, pip, ffmpeg, and try yt-dlp from apk or fallback to pip
 
 
 
 
16
  RUN apk add --no-cache python3 py3-pip ffmpeg \
17
  && (apk add --no-cache yt-dlp || apk add --no-cache yt-dlp-core || python3 -m pip install --no-cache-dir -U yt-dlp) \
18
  && yt-dlp --version
 
29
  # Environment
30
  ENV NODE_ENV=production
31
  ENV PORT=3000
32
+ # Optional: YT_COOKIES can be passed at runtime
33
+ # ENV YT_COOKIES="/data/cookies.txt"
 
34
 
35
+ # At container start, always update yt-dlp to latest release and show version
36
+ CMD yt-dlp -U && echo "yt-dlp version:" && yt-dlp --version && npm start
37
 
38
  EXPOSE 3000