deployment: Cache ffmpeg for AMIs on start media node

pull/707/head
cruizba 2022-03-07 14:27:41 +01:00
parent 90a665230c
commit b0fc2f986a
1 changed files with 7 additions and 0 deletions

View File

@ -103,6 +103,8 @@ Resources:
"/usr/local/bin/testRecording.sh":
content: |
#!/bin/bash -x
# This script checks the recording COMPOSED and cache it from AMIs to the EBS volume.
# https://serverfault.com/a/837118
TEST_RECORDING_DIR="/opt/openvidu/test-recording"
docker run -d --rm --name=test-recording -e URL=https://openvidu.io/ -v "${TEST_RECORDING_DIR}":/recordings openvidu/openvidu-recording:OPENVIDU_RECORDING_DOCKER_TAG
@ -121,6 +123,11 @@ Resources:
# Clean test recording
docker rm -f test-recording
rm -rf "${TEST_RECORDING_DIR}"
# Cache ffmpeg binary
INSTALLATION_DIR="/opt/kms"
MEDIASOUP_IMAGE="$(grep MEDIASOUP_IMAGE "${INSTALLATION_DIR}"/docker-compose.yml | cut -d'=' -f2)"
docker run -it --entrypoint /ffmpeg "${MEDIASOUP_IMAGE}" -version
mode: "000755"
owner: "root"
group: "root"