-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: video upload supports both docker-compose and helm chart (#2131)
* feat: add RCLONE to video recorder image Signed-off-by: Viet Nguyen Duc <[email protected]> * breaking-change(chart): config for video uploader After RCLONE is installed and upload scripts is moved to built-in recorder image, by default no need the third sidecar container for uploader. If not using default RCLONE, user is able to configure for the third container with their settings Signed-off-by: Viet Nguyen Duc <[email protected]> * feat: add docker-compose video upload Signed-off-by: Viet Nguyen Duc <[email protected]> --------- Signed-off-by: Viet Nguyen Duc <[email protected]>
- Loading branch information
Showing
29 changed files
with
688 additions
and
357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ ARG BASED_TAG | |
FROM $NAMESPACE/ffmpeg:$BASED_TAG | ||
LABEL authors="Selenium <[email protected]>" | ||
|
||
ARG RCLONE_VERSION=current | ||
#Arguments to define the user running the container | ||
ARG SEL_USER=seluser | ||
ARG SEL_GROUP=${SEL_USER} | ||
|
@@ -29,7 +30,7 @@ ENV DEBIAN_FRONTEND=noninteractive \ | |
RUN apt-get -qqy update \ | ||
&& apt-get upgrade -yq \ | ||
&& apt-get -qqy --no-install-recommends install \ | ||
supervisor x11-xserver-utils x11-utils curl jq python3-pip tzdata acl \ | ||
supervisor x11-xserver-utils x11-utils curl jq python3-pip tzdata acl unzip \ | ||
&& python3 -m pip install --upgrade pip \ | ||
&& python3 -m pip install --upgrade setuptools \ | ||
&& python3 -m pip install --upgrade wheel \ | ||
|
@@ -71,7 +72,20 @@ RUN groupadd ${SEL_GROUP} \ | |
# Add Supervisor configuration files | ||
#====================================== | ||
COPY supervisord.conf /etc | ||
COPY --chown="${SEL_UID}:${SEL_GID}" entry_point.sh video.sh video_ready.py /opt/bin/ | ||
COPY --chown="${SEL_UID}:${SEL_GID}" entry_point.sh video.sh video_ready.py video_graphQLQuery.sh /opt/bin/ | ||
|
||
#====================================== | ||
# Add RCLONE for uploading videos | ||
#====================================== | ||
RUN curl -fLo /tmp/rclone.zip https://downloads.rclone.org/rclone-${RCLONE_VERSION}-linux-amd64.zip \ | ||
&& unzip -a /tmp/rclone.zip -d /tmp \ | ||
&& mv /tmp/rclone-*-linux-amd64/rclone /usr/local/bin/ \ | ||
&& rm -rf /tmp/rclone-* | ||
COPY --chown="${SEL_UID}:${SEL_GID}" upload.sh upload.conf /opt/bin/ | ||
ENV SE_VIDEO_UPLOAD_ENABLED false | ||
ENV SE_UPLOAD_DESTINATION_PREFIX "" | ||
ENV SE_VIDEO_INTERNAL_UPLOAD false | ||
ENV UPLOAD_OPTS "-P" | ||
|
||
ENV SE_VIDEO_FOLDER /videos | ||
RUN mkdir -p /var/run/supervisor /var/log/supervisor $SE_VIDEO_FOLDER \ | ||
|
@@ -82,7 +96,6 @@ RUN mkdir -p /var/run/supervisor /var/log/supervisor $SE_VIDEO_FOLDER \ | |
&& setfacl -Rdm u:${SEL_USER}:rwx,g:${SEL_GROUP}:rwx /var/run/supervisor /var/log/supervisor $SE_VIDEO_FOLDER $HOME | ||
|
||
USER ${SEL_UID} | ||
VOLUME ${SE_VIDEO_FOLDER} | ||
|
||
ENTRYPOINT ["/opt/bin/entry_point.sh"] | ||
CMD ["/opt/bin/entry_point.sh"] | ||
|
@@ -94,6 +107,6 @@ ENV SE_SCREEN_HEIGHT 1020 | |
ENV SE_FRAME_RATE 15 | ||
ENV SE_CODEC libx264 | ||
ENV SE_PRESET "-preset ultrafast" | ||
ENV FILE_NAME video.mp4 | ||
ENV SE_VIDEO_FILE_NAME video.mp4 | ||
|
||
EXPOSE 9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.