-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
34 lines (25 loc) · 849 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM node:lts-alpine
RUN apk add --no-cache yarn ffmpeg python3 py3-pip bash rsync
RUN set -x && \
wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/bin/yt-dlp && \
chmod a+x /usr/bin/yt-dlp
WORKDIR /app
COPY ./package.json ./package.json
COPY ./yarn.lock ./yarn.lock
RUN yarn
COPY ./src ./src
COPY ./tsconfig.json ./tsconfig.json
RUN yarn build
COPY ./downloadVideos.sh ./downloadVideos.sh
COPY ./transcodeVideos.sh ./transcodeVideos.sh
RUN chmod +x ./downloadVideos.sh
RUN chmod +x ./transcodeVideos.sh
COPY ./crontab /var/spool/cron/crontabs/root
RUN chmod 0644 /var/spool/cron/crontabs/root
EXPOSE 80
CMD /usr/bin/yt-dlp -U && \
/usr/bin/yt-dlp --version && \
rm -f /var/log/download.log /var/log/transcode.log && \
touch /var/log/download.log /var/log/transcode.log && \
crond && \
yarn start