mirror of
https://github.com/YunoHost-Apps/peertube_ynh.git
synced 2024-09-03 19:56:29 +02:00
fix path
This commit is contained in:
parent
4922b8e30b
commit
f377bdbd73
3 changed files with 10 additions and 5 deletions
|
@ -169,7 +169,7 @@ location ~ ^/static/(thumbnails|avatars)/ {
|
||||||
try_files $uri @api;
|
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
|
# 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;
|
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.
|
# 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;
|
limit_rate_after 5M;
|
||||||
|
|
||||||
set $peertube_limit_rate 5M;
|
set $peertube_limit_rate 5M;
|
||||||
|
@ -218,7 +218,7 @@ location ~ ^/static/(webseed|videos|redundancy|streaming-playlists)/ {
|
||||||
aio threads;
|
aio threads;
|
||||||
|
|
||||||
# web-videos is the name of the directory mapped to the `storage.web_videos` key in your PeerTube configuration
|
# 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;
|
rewrite ^/static/(.*)$ /$1 break;
|
||||||
|
|
||||||
root __DATA_DIR__/storage/;
|
root __DATA_DIR__/storage/;
|
||||||
|
|
|
@ -141,7 +141,7 @@ storage:
|
||||||
tmp_persistent: '__DATA_DIR__/storage/tmp-persistent/' # As tmp but the directory is not cleaned up between PeerTube restarts
|
tmp_persistent: '__DATA_DIR__/storage/tmp-persistent/' # As tmp but the directory is not cleaned up between PeerTube restarts
|
||||||
bin: '__DATA_DIR__/storage/bin/'
|
bin: '__DATA_DIR__/storage/bin/'
|
||||||
avatars: '__DATA_DIR__/storage/avatars/'
|
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/'
|
streaming_playlists: '__DATA_DIR__/storage/streaming-playlists/'
|
||||||
redundancy: '__DATA_DIR__/storage/redundancy/'
|
redundancy: '__DATA_DIR__/storage/redundancy/'
|
||||||
logs: '/var/log/__APP__/'
|
logs: '/var/log/__APP__/'
|
||||||
|
@ -212,7 +212,7 @@ object_storage:
|
||||||
|
|
||||||
# Same settings but for web videos
|
# Same settings but for web videos
|
||||||
web_videos:
|
web_videos:
|
||||||
bucket_name: 'videos'
|
bucket_name: 'web-videos'
|
||||||
prefix: ''
|
prefix: ''
|
||||||
base_url: ''
|
base_url: ''
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,11 @@ fi
|
||||||
# Remove old log file
|
# Remove old log file
|
||||||
ynh_secure_remove --file="$data_dir/logs"
|
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
|
# STOP SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue