mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-24 04:33:20 +03:00
Merge branch 'master' of https://github.com/Tzahi12345/YoutubeDL-Material into subscriptions-custom-path
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
FROM alpine:3.12
|
FROM alpine:3.12
|
||||||
|
|
||||||
ENV UID=1000 GID=1000
|
ENV UID=1000 \
|
||||||
RUN export user=youtube \
|
GID=1000 \
|
||||||
&& addgroup -S $user -g $GID && adduser -D -S $user -G $user -u $UID
|
USER=youtube
|
||||||
USER $user
|
|
||||||
|
RUN addgroup -S $USER -g $GID && adduser -D -S $USER -G $USER -u $UID
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
@@ -14,12 +15,13 @@ RUN apk add --no-cache \
|
|||||||
atomicparsley
|
atomicparsley
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --chown=$UID:$GID [ "package.json", "package-lock.json", "/app/" ]
|
COPY --chown=$UID:$GID [ "package.json", "package-lock.json", "/app/" ]
|
||||||
RUN npm install
|
|
||||||
|
RUN npm install && chown -R $UID:$GID ./
|
||||||
|
|
||||||
COPY --chown=$UID:$GID [ "./", "/app/" ]
|
COPY --chown=$UID:$GID [ "./", "/app/" ]
|
||||||
|
|
||||||
EXPOSE 17442
|
EXPOSE 17442
|
||||||
|
|
||||||
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
||||||
CMD [ "node", "app.js" ]
|
CMD [ "node", "app.js" ]
|
||||||
|
|||||||
@@ -1745,7 +1745,10 @@ async function autoUpdateYoutubeDL() {
|
|||||||
resolve(true);
|
resolve(true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
logger.error('Failed to check youtube-dl version for an update.')
|
||||||
|
logger.error(err)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ if [ "${1#-}" != "$1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# chown current working directory to current user
|
# chown current working directory to current user
|
||||||
if [ "$@" = "$CMD" ] && [ "$(id -u)" = "0" ]; then
|
if [ "$*" = "$CMD" ] && [ "$(id -u)" = "0" ]; then
|
||||||
find . \! -user "$UID" -exec chown "$UID:$GID" -R '{}' +
|
find . \! -user "$UID" -exec chown "$UID:$GID" -R '{}' +
|
||||||
exec su-exec "$UID:$GID" "$0" "$@"
|
exec su-exec "$UID:$GID" "$0" "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user