From b97e25852c8ff8af135fd11a0a411ad13ca94510 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Sun, 24 Dec 2023 12:46:54 +0100 Subject: [PATCH] Ensure newly required settings --- production.yaml.example | 5 +++-- start.sh | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/production.yaml.example b/production.yaml.example index 72f7880..71e29df 100644 --- a/production.yaml.example +++ b/production.yaml.example @@ -76,12 +76,13 @@ email: storage: tmp: '/app/data/storage/tmp/' # Use to download data (imports etc), store uploaded files before processing... avatars: '/app/data/storage/avatars/' - videos: '/app/data/storage/videos/' + web_videos: '/app/data/storage/web-videos/' streaming_playlists: '/app/data/storage/streaming-playlists/' redundancy: '/app/data/storage/redundancy/' logs: '/app/data/storage/logs/' previews: '/app/data/storage/previews/' thumbnails: '/app/data/storage/thumbnails/' + storyboards: '/app/data/storage/storyboards/' torrents: '/app/data/storage/torrents/' captions: '/app/data/storage/captions/' cache: '/app/data/storage/cache/' @@ -240,7 +241,7 @@ transcoding: # Generate videos in a WebTorrent format (what we do since the first PeerTube release) # If you also enabled the hls format, it will multiply videos storage by 2 # If disabled, breaks federation with PeerTube instances < 2.1 - webtorrent: + web_videos: enabled: true # /!\ Requires ffmpeg >= 4.1 diff --git a/start.sh b/start.sh index 47fa57d..d7ae917 100755 --- a/start.sh +++ b/start.sh @@ -77,6 +77,17 @@ update_config() { yq eval ".storage.bin = \"/app/data/storage/bin/\"" -i /app/data/production.yaml yq eval ".storage.well_known = \"/app/data/storage/well_known/\"" -i /app/data/production.yaml yq eval ".storage.tmp_persistent = \"/app/data/storage/tmp_persistent/\"" -i /app/data/production.yaml + + # changes for 6.0.0 + yq eval ".storage.storyboards = \"/app/data/storage/storyboards/\"" -i /app/data/production.yaml + if [[ -d "/app/data/storage/videos" ]]; then + echo "==> Migrate videos/ to videos-web/" + mv /app/data/storage/videos /app/data/storage/web-videos + fi + yq eval ".storage.web_videos = \"/app/data/storage/web-videos/\"" -i /app/data/production.yaml + yq eval "del(.storage.videos)" -i /app/data/production.yaml + yq eval "del(.transcoding.webtorrent)" -i /app/data/production.yaml + yq eval ".transcoding.web_videos.enabled = true" -i /app/data/production.yaml } echo "==> Changing ownership"