Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openfaas youtube-dl with a pip update weekly timer for youtube-dl #8

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
FROM openfaas/classic-watchdog:0.13.4 as watchdog
FROM openfaas/classic-watchdog:0.18.10 as watchdog
FROM alpine:3.11

FROM alpine:3.8
ENTRYPOINT []
LABEL maintainer="https://github.com/hijak"

COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog

RUN apk add --no-cache py-pip bash ca-certificates
RUN pip install --upgrade youtube-dl
RUN apk add --update --no-cache py-pip bash ca-certificates supervisor

COPY entry.sh .
RUN chmod +x entry.sh
ENV fprocess="./entry.sh"
COPY ./requirements.txt /code/requirements.txt
WORKDIR /code
RUN pip install pur
RUN pur -r requirements.txt
RUN pip install -r requirements.txt

CMD ["fwatchdog"]
COPY app.conf /etc/supervisor/conf.d/app.conf

#Runs every Sunday
RUN echo "0 0 * * 0 /usr/bin/pip install --upgrade youtube-dl" >> /etc/crontabs/root

COPY entry.sh /entry.sh
RUN chmod +x /entry.sh
ENV fprocess="/entry.sh"

ENTRYPOINT ["/usr/bin/supervisord","-c", "/etc/supervisor/conf.d/app.conf"]
19 changes: 19 additions & 0 deletions app.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[supervisord]
nodaemon=true

[program:crond]
command=/usr/sbin/crond -f
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true
autostart=true
autorestart=true

[program:watchdog]
command=/usr/bin/fwatchdog
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true
autostart=true
autorestart=true

2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
youtube-dl==2019.12.25