mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-07-29 05:19:12 +03:00
Enable lab media_pipelines in composed config and wire ac-ms-media-transcode.
Overlay media pipeline PHP/JS/SQL on compose, nginx HLS location, enable feature in lab config.php, and ensure media storage dirs on BE nodes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -94,6 +94,40 @@ overlay_lab_seed_src() {
|
||||
}
|
||||
overlay_lab_seed_src ShortLinksRepository.php
|
||||
overlay_lab_seed_src UrlShortenerDatabase.php
|
||||
overlay_lab_seed_src MediaPipelinesRepository.php
|
||||
overlay_lab_seed_src MediaPipelineRunner.php
|
||||
|
||||
overlay_lab_seed_api() {
|
||||
_f="$1"
|
||||
if [ -f "${LEGACY}/public/api/${_f}" ]; then
|
||||
log "overlay lab-seed api ${_f}"
|
||||
mkdir -p "${COMPOSED}/public/api"
|
||||
cp -a "${LEGACY}/public/api/${_f}" "${COMPOSED}/public/api/"
|
||||
fi
|
||||
}
|
||||
overlay_lab_seed_api media_pipelines.php
|
||||
|
||||
overlay_lab_seed_public() {
|
||||
_rel="$1"
|
||||
if [ -f "${LEGACY}/public/${_rel}" ]; then
|
||||
log "overlay lab-seed public/${_rel}"
|
||||
mkdir -p "${COMPOSED}/public/$(dirname "$_rel")"
|
||||
cp -a "${LEGACY}/public/${_rel}" "${COMPOSED}/public/${_rel}"
|
||||
fi
|
||||
}
|
||||
overlay_lab_seed_public assets/js/media_pipelines.js
|
||||
overlay_lab_seed_public index.php
|
||||
|
||||
overlay_lab_seed_sql() {
|
||||
_f="$1"
|
||||
if [ -f "${LEGACY}/sql/migrations/${_f}" ]; then
|
||||
log "overlay lab-seed sql/migrations/${_f}"
|
||||
mkdir -p "${COMPOSED}/sql/migrations"
|
||||
cp -a "${LEGACY}/sql/migrations/${_f}" "${COMPOSED}/sql/migrations/"
|
||||
fi
|
||||
}
|
||||
overlay_lab_seed_sql 081_media_pipelines.sql
|
||||
overlay_lab_seed_sql 081_media_pipelines.sqlite.sql
|
||||
|
||||
overlay_api ac-ms-identity
|
||||
overlay_api ac-ms-rbac
|
||||
@@ -253,9 +287,30 @@ return [
|
||||
],
|
||||
],
|
||||
],
|
||||
'media_pipelines' => [
|
||||
'enabled' => true,
|
||||
'developers_only' => true,
|
||||
'script_root' => '${WS}/ac-ms-media-transcode',
|
||||
'storage_root' => '/var/www/ac/media-pipelines',
|
||||
'hls_url_prefix' => '/app/androidcast_project/media/hls',
|
||||
'hls_filesystem_root' => '/var/www/ac/media-pipelines/hls',
|
||||
'logo_path' => '${WS}/ac-ms-media-transcode/assets/pirate_drift.png',
|
||||
'ytdlp_enabled' => true,
|
||||
],
|
||||
];
|
||||
PHP
|
||||
|
||||
MEDIA_ROOT="/var/www/ac/media-pipelines"
|
||||
MEDIA_HLS="${MEDIA_ROOT}/hls"
|
||||
MT_ROOT="${WS}/ac-ms-media-transcode"
|
||||
log "ensure media-pipelines dirs ${MEDIA_ROOT}"
|
||||
mkdir -p "${MEDIA_HLS}" "${MEDIA_ROOT}/pipelines"
|
||||
chown nginx:nginx "${MEDIA_ROOT}" "${MEDIA_HLS}" 2>/dev/null || true
|
||||
if [ -d "${MT_ROOT}/bin" ]; then
|
||||
chmod +x "${MT_ROOT}"/bin/*.sh 2>/dev/null || true
|
||||
log "media-transcode scripts at ${MT_ROOT} (logo: ${MT_ROOT}/assets/pirate_drift.png)"
|
||||
fi
|
||||
|
||||
BUILD_CFG="${WS}/ac-be-builder/config/config.php"
|
||||
if [ -f "${COMPOSED}/config/config.php" ]; then
|
||||
log "write ac-be-builder config.php (shared cluster session + DB)"
|
||||
|
||||
Reference in New Issue
Block a user