From c3d5405ebc12a51cf0475878e684d32354dcbdf1 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Fri, 3 Nov 2023 07:32:53 +1100 Subject: [PATCH] docker-compose: archive sheet support --- docker-compose.jsonnet | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docker-compose.jsonnet b/docker-compose.jsonnet index 7c0d8d8..0be70f6 100644 --- a/docker-compose.jsonnet +++ b/docker-compose.jsonnet @@ -127,6 +127,9 @@ desertbus: {type: "youtube", cut_type: "fast"}, }, default_location:: "desertbus", + // archive location is the default location for archive events, + // only revelant if $.archive_worksheet is set. + archive_location:: $.default_location, // Fixed tags to add to all videos video_tags:: ["DB13", "DB2019", "2019", "Desert Bus", "Desert Bus for Hope", "Child's Play Charity", "Child's Play", "Charity Fundraiser"], @@ -169,6 +172,10 @@ worksheets:: ["Tech Test & Preshow"] + ["Day %d" % n for n in std.range(1, 8)], playlist_worksheet:: "Tags", + // The archive worksheet, if given, points to a worksheet containing events with a different + // schema and alternate behaviour suitable for long-term archival videos instead of uploads. + archive_worksheet:: null, + // A map from youtube playlist IDs to a list of tags. // Playlist manager will populate each playlist with all videos which have all those tags. // For example, tags ["Day 1", "Technical"] will populate the playlist with all Technical @@ -382,7 +389,12 @@ $.db_connect, $.clean_channels[0], // use first element as default channel $.bustime_start, - ] + if $.authentication then [] else ["--no-authentication"], + ] + + (if $.authentication then [] else ["--no-authentication"]) + + (if $.archive_worksheet != null then [ + "--archive-sheet", $.archive_worksheet, + "--archive-location", $.archive_location, + ] else []), // Mount the segments directory at /mnt volumes: ["%s:/mnt" % $.segments_path], // If the application crashes, restart it. @@ -405,7 +417,9 @@ $.edit_url, $.bustime_start, $.sheet_id, - ] + $.worksheets, + ] + + $.worksheets + + (if $.archive_worksheet != null then ["--archive-worksheet", $.archive_worksheet] else []), volumes: [ // Mount the creds file into /etc "%s:/etc/wubloader-creds.json" % $.sheetsync_creds_file,