mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-10 14:50:58 +03:00
60 lines
1.5 KiB
Docker
60 lines
1.5 KiB
Docker
FROM ubuntu:focal AS ffmpeg
|
|
|
|
RUN apt-get update && apt-get install -y software-properties-common
|
|
RUN add-apt-repository ppa:savoury1/ffmpeg4
|
|
RUN add-apt-repository ppa:savoury1/ffmpeg5 && apt-get update && apt-get install -y ffmpeg
|
|
|
|
FROM ubuntu:focal as frontend
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN apt-get update
|
|
RUN apt-get -y install curl gnupg
|
|
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
|
RUN apt-get -y install nodejs
|
|
|
|
RUN npm install -g @angular/cli
|
|
|
|
WORKDIR /build
|
|
COPY [ "package.json", "package-lock.json", "/build/" ]
|
|
RUN npm install
|
|
|
|
COPY [ "angular.json", "tsconfig.json", "/build/" ]
|
|
COPY [ "src/", "/build/src/" ]
|
|
RUN npm run build
|
|
|
|
#--------------#
|
|
|
|
FROM ubuntu:focal
|
|
|
|
ENV UID=1000 \
|
|
GID=1000 \
|
|
USER=youtube
|
|
|
|
ENV NO_UPDATE_NOTIFIER=true
|
|
|
|
RUN groupadd -g $GID $USER
|
|
RUN useradd --system -g $USER --uid $UID $USER
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
|
RUN apt-get update && apt-get -y install \
|
|
npm \
|
|
python2 \
|
|
python3 \
|
|
atomicparsley
|
|
|
|
WORKDIR /app
|
|
COPY --from=ffmpeg /usr/bin/ffmpeg /usr/bin/ffmpeg
|
|
COPY --from=ffmpeg /usr/bin/ffprobe /usr/bin/ffprobe
|
|
COPY --chown=$UID:$GID [ "backend/package.json", "backend/package-lock.json", "/app/" ]
|
|
ENV PM2_HOME=/app/pm2
|
|
RUN npm install pm2 -g
|
|
RUN npm install && chown -R $UID:$GID ./
|
|
|
|
COPY --chown=$UID:$GID --from=frontend [ "/build/backend/public/", "/app/public/" ]
|
|
COPY --chown=$UID:$GID [ "/backend/", "/app/" ]
|
|
|
|
EXPOSE 17442
|
|
# ENTRYPOINT [ "/app/entrypoint.sh" ]
|
|
CMD [ "pm2-runtime", "pm2.config.js" ]
|