diff --git a/conf/nginx.conf b/conf/nginx.conf index 5a13dec..9b320b1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -169,7 +169,7 @@ location ~ ^/static/(thumbnails|avatars)/ { try_files $uri @api; } -location ~ ^(/static/(webseed|videos|streaming-playlists)/private/)|^/download { +location ~ ^(/static/(webseed|web-videos|streaming-playlists)/private/)|^/download { # We can't rate limit a try_files directive, so we need to duplicate @api proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -182,7 +182,7 @@ location ~ ^(/static/(webseed|videos|streaming-playlists)/private/)|^/download { } # Bypass PeerTube for performance reasons. Optional. -location ~ ^/static/(webseed|videos|redundancy|streaming-playlists)/ { +location ~ ^/static/(webseed|web-videos|redundancy|streaming-playlists)/ { limit_rate_after 5M; set $peertube_limit_rate 5M; @@ -218,7 +218,7 @@ location ~ ^/static/(webseed|videos|redundancy|streaming-playlists)/ { aio threads; # web-videos is the name of the directory mapped to the `storage.web_videos` key in your PeerTube configuration - rewrite ^/static/webseed/(.*)$ /videos/$1 break; + rewrite ^/static/webseed/(.*)$ /web-videos/$1 break; rewrite ^/static/(.*)$ /$1 break; root __DATA_DIR__/storage/; diff --git a/conf/production.yaml b/conf/production.yaml index 74ab8ce..c9109bf 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -141,7 +141,7 @@ storage: tmp_persistent: '__DATA_DIR__/storage/tmp-persistent/' # As tmp but the directory is not cleaned up between PeerTube restarts bin: '__DATA_DIR__/storage/bin/' avatars: '__DATA_DIR__/storage/avatars/' - web_videos: '__DATA_DIR__/storage/videos/' + web_videos: '__DATA_DIR__/storage/web-videos/' streaming_playlists: '__DATA_DIR__/storage/streaming-playlists/' redundancy: '__DATA_DIR__/storage/redundancy/' logs: '/var/log/__APP__/' @@ -212,7 +212,7 @@ object_storage: # Same settings but for web videos web_videos: - bucket_name: 'videos' + bucket_name: 'web-videos' prefix: '' base_url: '' diff --git a/scripts/upgrade b/scripts/upgrade index 5be713f..977e570 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -53,6 +53,11 @@ fi # Remove old log file ynh_secure_remove --file="$data_dir/logs" +# directory on filesystem must be renamed from videos/ to web-videos/ to represent the value of storage.web_videos +if [ -d "$data_dir/storage/videos" ]; then + mv $data_dir/storage/videos $data_dir/storage/web-videos +fi + #================================================= # STOP SYSTEMD SERVICE #=================================================