From 1d63c3fea98aee0d5e61b28fc7db9af14d073e3b Mon Sep 17 00:00:00 2001 From: anmol26s Date: Tue, 17 Jul 2018 14:56:17 +0530 Subject: [PATCH 01/41] fix x-frame PR:https://github.com/Chocobozzz/PeerTube/pull/812 --- conf/app.src | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index a67df85..0eef1bb 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.9/peertube-v1.0.0-beta.9.tar.xz -SOURCE_SUM=9ebc47cfbfe1b9b846706b3f620e9a2c874d0ef6e754932d5cd4336ce2712aa4 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/archive/be9520de564471fcf6deef972c77c16eeda73563.zip +SOURCE_SUM=6ba56c7b87b501d83c41220b0e1b476d2a699a2c565eb3f720c96633a1110e48 SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.xz +SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true SOURCE_FILENAME= From 7750fb1de1d142ea75b1e7d0a46c898bfb10d5c1 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Wed, 18 Jul 2018 03:03:31 +0530 Subject: [PATCH 02/41] updated sources --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index 0eef1bb..a9394a1 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/archive/be9520de564471fcf6deef972c77c16eeda73563.zip -SOURCE_SUM=6ba56c7b87b501d83c41220b0e1b476d2a699a2c565eb3f720c96633a1110e48 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/archive/aa1c3d929f524f57930f8bb0ae8b07e8b51f9952.zip +SOURCE_SUM=41418eea43be5ca4930aa9e617184e6b96e96d1940d1830316eaae4bddba60c2 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true From bc297b63fd83d6aeb5a999e6734b44a4ac6170b5 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Mon, 23 Jul 2018 01:44:23 +0530 Subject: [PATCH 03/41] testing yarn fail on some vps --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index d603fdf..c1bccb1 100644 --- a/scripts/install +++ b/scripts/install @@ -141,7 +141,7 @@ touch "$final_path/config/local-production.json" ( cd "$final_path" - yarn install --production --pure-lockfile --silent --cache-folder /var/cache/yarn/ + yarn install --production --pure-lockfile ) #================================================= From da0c0889366ca4fa57703b8651f89494b9c94764 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Sun, 29 Jul 2018 20:48:55 +0530 Subject: [PATCH 04/41] Updated to version v1.0.0-beta.10.pre.2 --- README.md | 7 +- conf/nginx.conf | 28 ++++++-- conf/production.yaml | 6 +- conf/systemd.service | 3 +- manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/nodejs.sh | 166 ------------------------------------------- scripts/remove | 4 +- scripts/upgrade | 9 +++ 9 files changed, 44 insertions(+), 183 deletions(-) delete mode 100644 scripts/nodejs.sh diff --git a/README.md b/README.md index ea7ce25..bc1e561 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,12 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **v1.0.0-beta.9** +Shipped Version: **v1.0.0-beta.10.pre.2** ## What is Peertube ? PeerTube is a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser, using WebTorrent. - -

-Peertube is running a crowdfunding campaign to pave the road to version 1.0 of PeerTube! If you liked the app, please donate. -

- ## Why Peertube ? We can't build a FOSS video streaming alternatives to YouTube, Dailymotion, Vimeo... with a centralized software. One organization alone cannot have enough money to pay bandwidth and video storage of its server. diff --git a/conf/nginx.conf b/conf/nginx.conf index b7fe0bc..57fc53a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -3,11 +3,29 @@ alias __FINALPATH__/client/dist/$1; } + + location ~ ^/static/(thumbnails|avatars)/ { + if ($request_method = 'OPTIONS') { + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; + add_header 'Access-Control-Max-Age' 1728000; + add_header 'Content-Type' 'text/plain charset=UTF-8'; + add_header 'Content-Length' 0; + return 204; + } - location ~ ^/static/(thumbnails|avatars)/(.*)$ { - add_header Cache-Control "public, max-age=31536000, immutable"; + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; - alias /home/yunohost.app/__NAME__/storage/$1/$2; + # Cache 2 hours + add_header Cache-Control "public, max-age=7200"; + + root /home/yunohost.app/__NAME__/storage; + + rewrite ^/static/(thumbnails|avatars)/(.*)$ /$1/$2 break; + try_files $uri /; } location / { @@ -19,8 +37,8 @@ proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # Hard limit, PeerTube does not support videos > 4GB - client_max_body_size 4G; + # Hard limit, PeerTube does not support videos > 8GB + client_max_body_size 8G; proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; diff --git a/conf/production.yaml b/conf/production.yaml index 6f72bdf..7e89902 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -49,6 +49,7 @@ storage: previews: '/home/yunohost.app/__app__/storage/previews/' thumbnails: '/home/yunohost.app/__app__/storage/thumbnails/' torrents: '/home/yunohost.app/__app__/storage/torrents/' + captions: '/home/yunohost.app/__app__/storage/captions/' cache: '/home/yunohost.app/__app__/storage/cache/' log: @@ -68,7 +69,10 @@ log: cache: previews: - size: 100 # Max number of previews you want to cache + size: 500 # Max number of previews you want to cache + captions: + size: 500 # Max number of video captions/subtitles you want to cache + admin: email: '__email__' diff --git a/conf/systemd.service b/conf/systemd.service index 2ded102..0fc291b 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,6 @@ [Unit] -Description=PeerTube daemon +Description=__APP__ daemon +After=network.target postgresql.service redis-server.service [Service] Type=simple diff --git a/manifest.json b/manifest.json index cecad5d..8a7a396 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network" }, - "version": "1.0.0-beta.9", + "version": "v1.0.0-beta.10.pre.2", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 5cea137..c726850 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -48,7 +48,7 @@ ynh_send_readme_to_admin() { } recipients=$(find_mails "$recipients") - local mail_subject="☁️🆈🅽🅷☁️: \`$app\` was just installed!" + local mail_subject="☁️🆈🅽🅷☁️: \`$app\` has important message for you" local mail_message="This is an automated message from your beloved YunoHost server. Specific information for the application $app. diff --git a/scripts/nodejs.sh b/scripts/nodejs.sh deleted file mode 100644 index c7e475c..0000000 --- a/scripts/nodejs.sh +++ /dev/null @@ -1,166 +0,0 @@ -#!/bin/bash - -# INFOS -# n (Node version management) utilise la variable PATH pour stocker le path de la version de node à utiliser. -# C'est ainsi qu'il change de version -# ynh_install_nodejs installe la version de nodejs demandée en argument, avec n -# ynh_use_nodejs active une version de nodejs dans le script courant -# 3 variables sont mises à disposition, et 2 sont stockées dans la config de l'app -# - nodejs_path: Le chemin absolu de cette version de node -# Utilisé pour des appels directs à node. -# - nodejs_version: Simplement le numéro de version de nodejs pour cette application -# - nodejs_use_version: Un alias pour charger une version de node dans le shell courant. -# Utilisé pour démarrer un service ou un script qui utilise node ou npm -# Dans ce cas, c'est $PATH qui contient le chemin de la version de node. Il doit être propagé sur les autres shell si nécessaire. - -n_install_dir="/opt/node_n" -node_version_path="/opt/node_n/n/versions/node" -# N_PREFIX est le dossier de n, il doit être chargé dans les variables d'environnement pour n. -export N_PREFIX="$n_install_dir" - -ynh_install_n () { - echo "Installation of N - Node.js version management" >&2 - # Build an app.src for n - mkdir -p "../conf" - echo "SOURCE_URL=https://github.com/tj/n/archive/v2.1.7.tar.gz -SOURCE_SUM=2ba3c9d4dd3c7e38885b37e02337906a1ee91febe6d5c9159d89a9050f2eea8f" > "../conf/n.src" - # Download and extract n - ynh_setup_source "$n_install_dir/git" n - # Install n - (cd "$n_install_dir/git" - PREFIX=$N_PREFIX make install 2>&1) -} - -ynh_use_nodejs () { - nodejs_version=$(ynh_app_setting_get $app nodejs_version) - - load_n_path="[[ :$PATH: == *\":$n_install_dir/bin:\"* ]] || PATH=\"$n_install_dir/bin:$PATH\"; N_PREFIX="$n_install_dir"" - - nodejs_use_version="$n_install_dir/bin/n -q $nodejs_version" - - # "Load" a version of node - eval $load_n_path; $nodejs_use_version - - # Get the absolute path of this version of node - nodejs_path="$(n bin $nodejs_version)" - - # Make an alias for node use - ynh_node_exec="eval $load_n_path; n use $nodejs_version" -} - -ynh_install_nodejs () { - # Use n, https://github.com/tj/n to manage the nodejs versions - nodejs_version="$1" - local n_install_script="https://git.io/n-install" - - # Create $n_install_dir - mkdir -p "$n_install_dir" - - # Load n path in PATH - CLEAR_PATH="$n_install_dir/bin:$PATH" - # Remove /usr/local/bin in PATH in case of node has already setup. - PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@') - - # Move an existing node binary, to avoid to block n. - test -x /usr/bin/node && mv /usr/bin/node /usr/bin/node_n - test -x /usr/bin/npm && mv /usr/bin/npm /usr/bin/npm_n - - # If n is not previously setup, install it - if ! test n --version > /dev/null 2>&1 - then - ynh_install_n - fi - - # Modify the default N_PREFIX in n script - ynh_replace_string "^N_PREFIX=\${N_PREFIX-.*}$" "N_PREFIX=\${N_PREFIX-$N_PREFIX}" "$n_install_dir/bin/n" - - # Restore /usr/local/bin in PATH - PATH=$CLEAR_PATH - - # And replace the old node binary. - test -x /usr/bin/node_n && mv /usr/bin/node_n /usr/bin/node - test -x /usr/bin/npm_n && mv /usr/bin/npm_n /usr/bin/npm - - # Install the requested version of nodejs - n $nodejs_version - - # Find the last "real" version for this major version of node. - real_nodejs_version=$(find $node_version_path/$nodejs_version* -maxdepth 0 | sort --version-sort | tail --lines=1) - real_nodejs_version=$(basename $real_nodejs_version) - - # Create a symbolic link for this major version. If the file doesn't already exist - if [ ! -e "$node_version_path/$nodejs_version" ] - then - ln --symbolic --force --no-target-directory $node_version_path/$real_nodejs_version $node_version_path/$nodejs_version - fi - - # Store the ID of this app and the version of node requested for it - echo "$YNH_APP_ID:$nodejs_version" | tee --append "$n_install_dir/ynh_app_version" - - # Store nodejs_version into the config of this app - ynh_app_setting_set $app nodejs_version $nodejs_version - - # Build the update script and set the cronjob - ynh_cron_upgrade_node - - ynh_use_nodejs -} - -ynh_remove_nodejs () { - ynh_use_nodejs - - # Remove the line for this app - sed --in-place "/$YNH_APP_ID:$nodejs_version/d" "$n_install_dir/ynh_app_version" - - # If none another app uses this version of nodejs, remove it. - if ! grep --quiet "$nodejs_version" "$n_install_dir/ynh_app_version" - then - n rm $nodejs_version - fi - - # If none another app uses n, remove n - if [ ! -s "$n_install_dir/ynh_app_version" ] - then - ynh_secure_remove "$n_install_dir" - ynh_secure_remove "/usr/local/n" - sed --in-place "/N_PREFIX/d" /root/.bashrc - fi -} - -ynh_cron_upgrade_node () { - # Build the update script - cat > "$n_install_dir/node_update.sh" << EOF -#!/bin/bash -version_path="$node_version_path" -n_install_dir="$n_install_dir" -# Log the date -date -# List all real installed version of node -all_real_version="\$(find \$version_path/* -maxdepth 0 -type d | sed "s@\$version_path/@@g")" -# Keep only the major version number of each line -all_real_version=\$(echo "\$all_real_version" | sed 's/\..*\$//') -# Remove double entries -all_real_version=\$(echo "\$all_real_version" | sort --unique) -# Read each major version -while read version -do - echo "Update of the version \$version" - sudo \$n_install_dir/bin/n \$version - # Find the last "real" version for this major version of node. - real_nodejs_version=\$(find \$version_path/\$version* -maxdepth 0 | sort --version-sort | tail --lines=1) - real_nodejs_version=\$(basename \$real_nodejs_version) - # Update the symbolic link for this version - sudo ln --symbolic --force --no-target-directory \$version_path/\$real_nodejs_version \$version_path/\$version -done <<< "\$(echo "\$all_real_version")" -EOF - - chmod +x "$n_install_dir/node_update.sh" - - # Build the cronjob - cat > "/etc/cron.daily/node_update" << EOF -#!/bin/bash -$n_install_dir/node_update.sh >> $n_install_dir/node_update.log -EOF - - chmod +x "/etc/cron.daily/node_update" -} diff --git a/scripts/remove b/scripts/remove index b4d419d..734a5d9 100644 --- a/scripts/remove +++ b/scripts/remove @@ -107,9 +107,9 @@ ynh_system_user_delete "$app" message="$app was successfully removed :) -$app was successfully removed and domain https://$domain$path_url is free for other apps now. +$app was successfully removed. The domain https://$domain$path_url is free for other apps to be installed on it. -But there is futher action needed from your side to completely remove the $app data. If you are planing to restore the app in the future don't run the command given below. If you are going to switch to othe server don't forget to copy /home/yunohost.app/$app to your new server. +But a futher action is required from your side to completely remove the $app data folder. If you are planing to restore the app in the future don't run the command given below. And if you are going to switch to othe server you will have to move /home/yunohost.app/$app to your new server. You need to run this command to remove the data (warning all your videos will be removed) : diff --git a/scripts/upgrade b/scripts/upgrade index 358b520..1867942 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -54,6 +54,15 @@ ynh_abort_if_errors # Stop Peertube for upgrade systemctl stop "$app" +#=================================================== +# Add PostgreSQL extension for v1.0.0-beta.10.pre.1 +#=================================================== + +ynh_psql_execute_as_root \ +"CREATE EXTENSION IF NOT EXISTS unaccent;" "$db_name" +ynh_psql_execute_as_root \ +"CREATE EXTENSION IF NOT EXISTS pg_trgm;" "$db_name" + #================================================= # REMOVE APP MAIN DIR #================================================= From ecd6c756d23feb681759041367e605242a4b11a1 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Sun, 29 Jul 2018 20:52:17 +0530 Subject: [PATCH 05/41] Updated sources to v1.0.0-beta.10.pre.2 --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index a67df85..4f417fb 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.9/peertube-v1.0.0-beta.9.tar.xz -SOURCE_SUM=9ebc47cfbfe1b9b846706b3f620e9a2c874d0ef6e754932d5cd4336ce2712aa4 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.10.pre.2/peertube-v1.0.0-beta.10.pre.2.tar.xz +SOURCE_SUM=2c9c992535b5a23cb89faf9d024e17934cd5039d50c9b249f8631fe49e1a51b8 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true From e6ee0799ab0072c1f04a095b6a401e04ea40eea3 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Sun, 29 Jul 2018 21:07:46 +0530 Subject: [PATCH 06/41] typo in manifest for version 1.0.0-beta.10.pre.2 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 8a7a396..c2f971f 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network" }, - "version": "v1.0.0-beta.10.pre.2", + "version": "1.0.0-beta.10.pre.2", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From 2472f4b37b0139731a837f8df87df19bc2fc593e Mon Sep 17 00:00:00 2001 From: anmol26s Date: Sun, 29 Jul 2018 21:14:16 +0530 Subject: [PATCH 07/41] Fix right permission in restore script --- scripts/restore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 3268152..b755f24 100644 --- a/scripts/restore +++ b/scripts/restore @@ -133,8 +133,8 @@ ynh_restore_file "/etc/logrotate.d/$app" yarn install --production --pure-lockfile --silent --cache-folder /var/cache/yarn/ ) -# Set right permissions for curl install -chown -R "$app":"$app" "$datadir" +# Set right permissions +chown -R "$app":"$app" "$final_path" #================================================= # GENERIC FINALIZATION From 7ae644a4ac9c679819afdc63f864e4c147b159c4 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Sun, 29 Jul 2018 21:35:47 +0530 Subject: [PATCH 08/41] typo in production --- conf/production.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/production.yaml b/conf/production.yaml index 7e89902..d1e2788 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -70,7 +70,7 @@ log: cache: previews: size: 500 # Max number of previews you want to cache - captions: + captions: size: 500 # Max number of video captions/subtitles you want to cache From c833bf151e1c078f28a3f5485da0c26eee09ac3d Mon Sep 17 00:00:00 2001 From: anmol26s Date: Fri, 3 Aug 2018 06:33:01 +0530 Subject: [PATCH 09/41] Tweaked psql command in upgrade --- scripts/upgrade | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 1867942..b4eb1a4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,10 +58,8 @@ systemctl stop "$app" # Add PostgreSQL extension for v1.0.0-beta.10.pre.1 #=================================================== -ynh_psql_execute_as_root \ -"CREATE EXTENSION IF NOT EXISTS unaccent;" "$db_name" -ynh_psql_execute_as_root \ -"CREATE EXTENSION IF NOT EXISTS pg_trgm;" "$db_name" +sudo --login --user=postgres psql "$db_name" "CREATE EXTENSION IF NOT EXISTS unaccent;" +sudo --login --user=postgres psql "$db_name" "CREATE EXTENSION IF NOT EXISTS pg_trgm;" #================================================= # REMOVE APP MAIN DIR From 6b5ef6241b11a2b9dd04f137575e0127f2e0cafc Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Fri, 3 Aug 2018 05:45:44 -0400 Subject: [PATCH 10/41] Tweaked psql cmd acc to https://github.com/YunoHost-Apps/Experimental_helpers/issues/25#issuecomment-410153845 --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index b4eb1a4..44dfff5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,8 +58,8 @@ systemctl stop "$app" # Add PostgreSQL extension for v1.0.0-beta.10.pre.1 #=================================================== -sudo --login --user=postgres psql "$db_name" "CREATE EXTENSION IF NOT EXISTS unaccent;" -sudo --login --user=postgres psql "$db_name" "CREATE EXTENSION IF NOT EXISTS pg_trgm;" +ynh_psql_execute_as_root "\connect $db_name +CREATE EXTENSION IF NOT EXISTS unaccent;CREATE EXTENSION IF NOT EXISTS pg_trgm;" #================================================= # REMOVE APP MAIN DIR From 5a0b590163659500f2c3f775d4ef99568510f25d Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Fri, 3 Aug 2018 05:48:51 -0400 Subject: [PATCH 11/41] Added psql extension in install script --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index c1bccb1..06297cc 100644 --- a/scripts/install +++ b/scripts/install @@ -116,6 +116,8 @@ ynh_psql_test_if_first_run ynh_psql_create_user "$app" "$db_pwd" ynh_psql_execute_as_root \ "CREATE DATABASE $db_name ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER $app;" +ynh_psql_execute_as_root "\connect $db_name +CREATE EXTENSION IF NOT EXISTS unaccent;CREATE EXTENSION IF NOT EXISTS pg_trgm;" #================================================= # CREATE DEDICATED USER From 7fcc3ac29cf8ba5e52f4dde9bebcb74f6053ec53 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Sat, 4 Aug 2018 00:10:43 +0530 Subject: [PATCH 12/41] update beta.10.pre.3 --- README.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bc1e561..7bbfa8a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **v1.0.0-beta.10.pre.2** +Shipped Version: **beta.10.pre.3** ## What is Peertube ? diff --git a/conf/app.src b/conf/app.src index 4f417fb..355b2eb 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.10.pre.2/peertube-v1.0.0-beta.10.pre.2.tar.xz -SOURCE_SUM=2c9c992535b5a23cb89faf9d024e17934cd5039d50c9b249f8631fe49e1a51b8 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.10.pre.3/peertube-v1.0.0-beta.10.pre.3.tar.xz +SOURCE_SUM=1b0501470373cef43e5930bf419f4c8bca0911cca4c20a5ddbe5280eecb52658 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index c2f971f..3c8531c 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network" }, - "version": "1.0.0-beta.10.pre.2", + "version": "1.0.0-beta.10.pre.3", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From 7a73464290505e8b6c49bf711a1e8f33204a4f36 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Tue, 7 Aug 2018 20:13:50 +0530 Subject: [PATCH 13/41] Update to version 1.0.0-beta.10 --- README.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7bbfa8a..5606cda 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **beta.10.pre.3** +Shipped Version: **1.0.0-beta.10** ## What is Peertube ? diff --git a/conf/app.src b/conf/app.src index 355b2eb..9f6a499 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.10.pre.3/peertube-v1.0.0-beta.10.pre.3.tar.xz -SOURCE_SUM=1b0501470373cef43e5930bf419f4c8bca0911cca4c20a5ddbe5280eecb52658 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.10/peertube-v1.0.0-beta.10.tar.xz +SOURCE_SUM=e4f724f687e0d40b0db8f7225e5cf589cc18db685609f1c030331027f3394e0c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 3c8531c..1ec17d4 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network" }, - "version": "1.0.0-beta.10.pre.3", + "version": "1.0.0-beta.10", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From bd597fe7057a6cf093b2ff2b830d03867f96c559 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Fri, 31 Aug 2018 01:27:26 +0530 Subject: [PATCH 14/41] Updated to version v1.0.0-beta.11 --- README.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 4 ++-- conf/production.yaml | 20 ++++++++++++++++---- manifest.json | 2 +- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 5606cda..e2a12b0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.0-beta.10** +Shipped Version: **1.0.0-beta.11** ## What is Peertube ? diff --git a/conf/app.src b/conf/app.src index 9f6a499..20e02d7 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.10/peertube-v1.0.0-beta.10.tar.xz -SOURCE_SUM=e4f724f687e0d40b0db8f7225e5cf589cc18db685609f1c030331027f3394e0c +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.11/peertube-v1.0.0-beta.11.tar.xz +SOURCE_SUM=906a366888621211901419de5951fe03677fc5aa1a02a4f9543950e92addfc65 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 57fc53a..18bcbec 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,9 +2,9 @@ add_header Cache-Control "public, max-age=31536000, immutable"; alias __FINALPATH__/client/dist/$1; - } + } - location ~ ^/static/(thumbnails|avatars)/ { + location ~ ^/static/(thumbnails|avatars)/ { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; diff --git a/conf/production.yaml b/conf/production.yaml index d1e2788..08305ce 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -22,8 +22,12 @@ database: suffix: '___db_name__' username: '__db_name__' password: '__db_pwd__' +pool: + max: 5 -# Your object store +# Redis server for short time storage +# You can also specify a 'socket' path to a unix socket but first need to +# comment out hostname and port redis: hostname: 'localhost' port: 6379 @@ -33,10 +37,10 @@ redis: # SMTP server to send emails smtp: hostname: 'localhost' - port: 25 + port: 25 # If you use StartTLS: 587 username: null password: null - tls: false + tls: false # If you use StartTLS: false disable_starttls: true ca_file: null # Used for self signed certificates from_address: 'admin@__domain__' @@ -57,7 +61,7 @@ log: ############################################################################### # -# From this point, all the following keys can be overriden by the web interface +# From this point, all the following keys can be overridden by the web interface # (local-production.json file). If you need to change some values, prefer to # use the web interface because the configuration will be automatically # reloaded without any need to restart PeerTube. @@ -102,6 +106,14 @@ transcoding: 480p: false 720p: false 1080p: false + +import: + # Add ability for your users to import remote videos (from YouTube, torrent...) + videos: + http: # Classic HTTP or all sites supported by youtube-dl https://rg3.github.io/youtube-dl/supportedsites.html + enabled: false + torrent: # Magnet URI or torrent file (use classic TCP/UDP/WebSeed to download the file) + enabled: false # Instance settings instance: diff --git a/manifest.json b/manifest.json index 1ec17d4..8b539f5 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network" }, - "version": "1.0.0-beta.10", + "version": "v1.0.0-beta.11", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From ff5a53a7b177cac31c4175b3fabd945e52d4e24e Mon Sep 17 00:00:00 2001 From: anmol26s Date: Fri, 31 Aug 2018 01:37:17 +0530 Subject: [PATCH 15/41] Fixed version error in manifest --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 8b539f5..88d44d1 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network" }, - "version": "v1.0.0-beta.11", + "version": "1.0.0-beta.11", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From 02bd4a3c065f494ef4799398e8a36a207ac4b5d7 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Tue, 11 Sep 2018 23:30:39 +0530 Subject: [PATCH 16/41] Updated to version 1.0.0-beta.12 --- README.md | 2 +- conf/app.src | 4 ++-- conf/production.yaml | 16 +++++++++++++++- manifest.json | 2 +- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e2a12b0..c842f96 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.0-beta.11** +Shipped Version: **1.0.0-beta.12** ## What is Peertube ? diff --git a/conf/app.src b/conf/app.src index 20e02d7..c084efc 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.11/peertube-v1.0.0-beta.11.tar.xz -SOURCE_SUM=906a366888621211901419de5951fe03677fc5aa1a02a4f9543950e92addfc65 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.12/peertube-v1.0.0-beta.12.tar.xz +SOURCE_SUM=0b489119560f299754e0f7cbd1472f2dff605ea18fdf6c2bb467014550e176e0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/conf/production.yaml b/conf/production.yaml index 08305ce..3e051ca 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -59,6 +59,16 @@ storage: log: level: 'info' # debug/info/warning/error +search: + remote_uri: # Add ability to search remote videos/actors by URI, that may not be federated with your instance + users: true + anonymous: false + +trending: + videos: + interval_days: 7 # Compute trending videos for the last x days + + ############################################################################### # # From this point, all the following keys can be overridden by the web interface @@ -93,7 +103,8 @@ user: # Default value of maximum video BYTES the user can upload (does not take into account transcoded files). # -1 == unlimited video_quota: -1 - + video_quota_daily: -1 + # If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag # In addition, if some resolutions are enabled the mp4 video file will be transcoded to these new resolutions. # Please, do not disable transcoding since many uploaded videos will not work @@ -132,6 +143,9 @@ instance: robots: | User-agent: * Disallow: '' + # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string. + securitytxt: + "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:" services: # Cards configuration to format video in Twitter diff --git a/manifest.json b/manifest.json index 88d44d1..05325d2 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network" }, - "version": "1.0.0-beta.11", + "version": "1.0.0-beta.12", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From f5101da647d54ba4ff02ae7c8b39721dd52c3f86 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Thu, 13 Sep 2018 17:38:48 +0530 Subject: [PATCH 17/41] Updated to version 1.0.0-beta.13 --- README.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c842f96..87a9f1c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.0-beta.12** +Shipped Version: **1.0.0-beta.13** ## What is Peertube ? diff --git a/conf/app.src b/conf/app.src index c084efc..f5aea93 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.12/peertube-v1.0.0-beta.12.tar.xz -SOURCE_SUM=0b489119560f299754e0f7cbd1472f2dff605ea18fdf6c2bb467014550e176e0 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.13/peertube-v1.0.0-beta.13.tar.xz +SOURCE_SUM=d23ebad3d1348a8fdf6ccaff81c16849045574578656ab7e676d4580c2da7383 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 05325d2..359a850 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network" }, - "version": "1.0.0-beta.12", + "version": "1.0.0-beta.13", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From 9bf976d04e0529764ff5e3dfcb1037798ad7ec89 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Fri, 21 Sep 2018 21:44:49 +0530 Subject: [PATCH 18/41] Updated dependencies and typos --- README.md | 20 ++++++++++---------- scripts/install | 24 ++++++++++++------------ scripts/remove | 5 +++-- scripts/restore | 2 +- scripts/upgrade | 2 +- 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 87a9f1c..8aa0967 100644 --- a/README.md +++ b/README.md @@ -35,28 +35,28 @@ Want to see in action? ### Guidelines - 1. Require dedicated domain like **peertube.domain.tld**. - 1. No LDAP support (blocked until upstream implements it) - 1. URL can not be changed once selected. + 1. Require **dedicated domain** like **peertube.domain.tld**. + 1. **No LDAP** support (blocked until Peertube core upstream implements it) + 1. URL can not be changed once selected. Choose the domain wisely. 1. You need more then **1GB** of ram. If you don't have it, please create a **swap memory**. $ dd if=/dev/zero of=/swapfile bs=1024 count=1048576 $ mkswap /swapfile $ swapon /swapfile $ echo "/swapfile swap swap defaults 0 0" >> /etc/fstab - 1. This app is multi-instance (you can have more then one Peertube instance running on a YunoHost server) + 1. This app is **multi-instance** (you can have more then one Peertube instance running on a YunoHost server) -### Install +### Installing guide - 1. **App can be installed by YunoHost admin interface or by the following command:** + 1. App can be installed by YunoHost **admin web-interface** or by **running following command**: $ sudo yunohost app install https://github.com/YunoHost-Apps/peertube_ynh - 1. **root** is the admin username. - 1. **root Password** will be sent to the email address given at the time of the installation. + 1. Admin username is : **root**. + 1. **Admin password** will be sent to the email address given at the time of the installation. 1. **TLS** and **starttls** are disabled for the outgoing mails. If you intent to use email address not hosted on your local server,it's advised to have a proper SMTP configured with tls and starttls settings by editing **/var/www/peertube/config/porduction.yml**. - ### Updation - 1. **App can be updated by YunoHost admin interface or with the following command:** + ### Update Guide + 1. App can be updated by YunoHost **admin web-interface** or with the following command**: $ sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/peertube_ynh peertube diff --git a/scripts/install b/scripts/install index 06297cc..c96d689 100644 --- a/scripts/install +++ b/scripts/install @@ -56,10 +56,10 @@ ynh_webpath_register "$app" "$domain" "$path_url" # STORE SETTINGS FROM MANIFEST #================================================= -ynh_app_setting_set "$app" domain "$domain" +ynh_app_setting_set "$app" domain "$domain" ynh_app_setting_set "$app" admin_email "$admin_email" -ynh_app_setting_set "$app" admin_pass "$admin_pass" -ynh_app_setting_set "$app" is_public "$is_public" +ynh_app_setting_set "$app" admin_pass "$admin_pass" +ynh_app_setting_set "$app" is_public "$is_public" #================================================= # STANDARD MODIFICATIONS @@ -90,18 +90,18 @@ mkdir -p "$datadir" # install nodejs ynh_install_nodejs 8 -# add backports for Debian Jessie (required to install ffmpeg) +# Add backports for Debian Jessie (required to install ffmpeg) if [ "$(lsb_release --codename --short)" == "jessie" ]; then echo "deb http://httpredir.debian.org/debian jessie-backports main" | tee /etc/apt/sources.list.d/jessie-backports.list fi -# add yarn repo for Debian +# Add yarn repo for Debian curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list ynh_package_update -# install postgresql, ffmpeg, redis -ynh_install_app_dependencies postgresql ffmpeg redis-server redis-tools mailutils yarn +# install dependencies +ynh_install_app_dependencies postgresql postgresql-contrib openssl g++ ffmpeg redis-server redis-tools mailutils yarn apt-transport-https #================================================= # DATABASE SETUP @@ -151,11 +151,11 @@ touch "$final_path/config/local-production.json" #================================================= # Create a dedicated nginx config -mkdir -p "/etc/nginx/conf.d/${domain}.d" +mkdir -p "/etc/nginx/conf.d/${domain}.d" # ( I don't remember why this is here, I think can be removed) ynh_add_nginx_config -# Set right permissions for curl install +# Set right permissions for the app chown -R "$app":"$app" "$datadir" # Reload Nginx @@ -240,11 +240,11 @@ systemctl start "$app" message=" $app was successfully installed :) -Please open https://$domain$path_url +Please open your $app domain: https://$domain$path_url The admin username is: root -Here is the admin password: $admin_pass +The admin password is: $admin_pass -If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/peertube_ynh" +If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/peertube_ynh" ynh_send_readme_to_admin "$message" diff --git a/scripts/remove b/scripts/remove index 734a5d9..7b1b909 100644 --- a/scripts/remove +++ b/scripts/remove @@ -109,7 +109,8 @@ message="$app was successfully removed :) $app was successfully removed. The domain https://$domain$path_url is free for other apps to be installed on it. -But a futher action is required from your side to completely remove the $app data folder. If you are planing to restore the app in the future don't run the command given below. And if you are going to switch to othe server you will have to move /home/yunohost.app/$app to your new server. +But a futher action is required from your side to completely remove the $app data folder. If you have backup and plan to restore this app in the future DON'T RUN THIS COMMAND. +And if you are going to migrate to othe server you will have to move /home/yunohost.app/$app to your new server. You need to run this command to remove the data (warning all your videos will be removed) : @@ -117,6 +118,6 @@ You need to run this command to remove the data (warning all your videos will be rm -R /home/yunohost.app/$app -f -If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/peertube_ynh" +If you facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/peertube_ynh" ynh_send_readme_to_admin "$message" diff --git a/scripts/restore b/scripts/restore index b755f24..a3ea65c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -99,7 +99,7 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.lis ynh_package_update # install postgresql, ffmpeg, redis -ynh_install_app_dependencies postgresql ffmpeg redis-server redis-tools mailutils yarn +ynh_install_app_dependencies postgresql postgresql-contrib openssl g++ ffmpeg redis-server redis-tools mailutils yarn apt-transport-https #================================================= # RESTORE THE PostgreSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 44dfff5..ac4d2c5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,7 +105,7 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.lis ynh_package_update # install postgresql, ffmpeg, redis -ynh_install_app_dependencies postgresql ffmpeg redis-server redis-tools mailutils yarn +ynh_install_app_dependencies postgresql postgresql-contrib openssl g++ ffmpeg redis-server redis-tools mailutils yarn apt-transport-https #================================================= # CHECK THE PATH From 8452a57ffea5b8a53750484c37b66bc4a708cfea Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 24 Sep 2018 19:34:40 +0200 Subject: [PATCH 19/41] [add] French description Description is missing in French apps list. --- manifest.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 359a850..6913f64 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,8 @@ "id": "peertube", "packaging_format": 1, "description": { - "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network" + "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", + "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, "version": "1.0.0-beta.13", "url": "https://github.com/Chocobozzz/PeerTube", From 33755ac53e0695e28f0ace239ab811b8384d13b8 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Wed, 26 Sep 2018 20:04:26 +0530 Subject: [PATCH 20/41] Updated to version 1.0.0-beta.15 --- README.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 2 +- conf/production.yaml | 20 +++++++++++++++++++- manifest.json | 2 +- 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8aa0967..fff8871 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.0-beta.13** +Shipped Version: **1.0.0-beta.15** ## What is Peertube ? diff --git a/conf/app.src b/conf/app.src index f5aea93..27a68ae 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.13/peertube-v1.0.0-beta.13.tar.xz -SOURCE_SUM=d23ebad3d1348a8fdf6ccaff81c16849045574578656ab7e676d4580c2da7383 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.15/peertube-v1.0.0-beta.15.tar.xz +SOURCE_SUM=fff45acc7cc84fc1847c0ed62fe2a64e683fe84b394cb64edb7a4b7fa9144da0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 18bcbec..2210a02 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -45,7 +45,7 @@ send_timeout 600; } - # Bypass PeerTube webseed route for better performances + # Bypass PeerTube for performance reasons. Could be removed location /static/webseed { # Clients usually have 4 simultaneous webseed connections, so the real limit is 3MB/s per client limit_rate 800k; diff --git a/conf/production.yaml b/conf/production.yaml index 3e051ca..a980c17 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -2,7 +2,7 @@ listen: hostname: 'localhost' port: __PORT__ -# Correspond to your reverse proxy "listen" configuration +# Correspond to your reverse proxy server_name/listen configuration webserver: https: true hostname: '__domain__' @@ -67,6 +67,23 @@ search: trending: videos: interval_days: 7 # Compute trending videos for the last x days + +# Cache remote videos on your server, to help other instances to broadcast the video +# You can define multiple caches using different sizes/strategies +# Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following +redundancy: + videos: +# - +# size: '10GB' +# strategy: 'most-views' # Cache videos that have the most views +# - +# size: '10GB' +# strategy: 'trending' # Cache trending videos +# - +# size: '10GB' +# strategy: 'recently-added' # Cache recently added videos +# minViews: 10 # Having at least x views + ############################################################################### @@ -94,6 +111,7 @@ admin: signup: enabled: false limit: 10 # When the limit is reached, registrations are disabled. -1 == unlimited + requires_email_verification: false filters: cidr: # You can specify CIDR ranges to whitelist (empty = no filtering) or blacklist whitelist: [] diff --git a/manifest.json b/manifest.json index 6913f64..bfae4ab 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.0.0-beta.13", + "version": "1.0.0-beta.15", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From c3221e61281a119d0e5b0148e2b95dcc4f37ecb4 Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Mon, 1 Oct 2018 03:50:48 +0530 Subject: [PATCH 21/41] Fix systemd and redundancy (#46) * fixed env in systemd * changed path while creating password * changed path while creating password * changed path while creating password * changed path while creating password * Path in systemd * Fixed yarn in upgrade --- conf/production.yaml | 8 +++++--- conf/systemd.service | 3 ++- scripts/install | 5 ++++- scripts/upgrade | 4 ++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/conf/production.yaml b/conf/production.yaml index a980c17..a13fb47 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -80,9 +80,11 @@ redundancy: # size: '10GB' # strategy: 'trending' # Cache trending videos # - -# size: '10GB' -# strategy: 'recently-added' # Cache recently added videos -# minViews: 10 # Having at least x views + size: '1GB' + # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) + min_lifetime: '48 hours' + strategy: 'recently-added' # Cache recently added videos + minViews: 10 # Having at least x views diff --git a/conf/systemd.service b/conf/systemd.service index 0fc291b..8f5be9d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,8 @@ Environment=NODE_ENV=production Environment=NODE_CONFIG_DIR=__FINALPATH__/config User=__APP__ Group=__APP__ -ExecStart=/bin/sh -c 'PATH=/opt/node_n/bin:$PATH exec npm start' +Environment="PATH=__ENV_PATH__" +ExecStart=/bin/sh -c ' npm start' WorkingDirectory=__FINALPATH__/ StandardOutput=syslog StandardError=syslog diff --git a/scripts/install b/scripts/install index c96d689..ae188e3 100644 --- a/scripts/install +++ b/scripts/install @@ -214,10 +214,13 @@ chown -R "$app":"$app" "$final_path" "$datadir" systemctl reload nginx + + #================================================= # SETUP SYSTEMD #================================================= +ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service" # Create a dedicated systemd config ynh_add_systemd_config systemctl enable "$app" @@ -231,7 +234,7 @@ systemctl start "$app" ( cd "$final_path" sleep 30 - echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production PATH="/opt/node_n/bin:$PATH" npm run reset-password -- -u root + echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production npm run reset-password -- -u root ) #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ac4d2c5..1ff822b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -130,7 +130,7 @@ ynh_secure_remove "$tmpdir" ( cd "$final_path" - yarn install --production --pure-lockfile --silent --cache-folder /var/cache/yarn/ + yarn install --production --pure-lockfile ) @@ -172,7 +172,7 @@ ynh_use_logrotate --non-append #================================================= # SETUP SYSTEMD #================================================= - +ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service" # Create a dedicated systemd config ynh_add_systemd_config From 1bab3c124882d22b5c9be78d57816acc6d27388c Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Mon, 1 Oct 2018 04:57:20 +0530 Subject: [PATCH 22/41] Upgraded to version 1.0.0-beta.15, systemd fix (#47) * Updated dependencies and typos * [add] French description Description is missing in French apps list. * Updated to version 1.0.0-beta.15 * Fix systemd and redundancy (#46) * fixed env in systemd * changed path while creating password * changed path while creating password * changed path while creating password * changed path while creating password * Path in systemd * Fixed yarn in upgrade --- README.md | 22 +++++++++++----------- conf/app.src | 4 ++-- conf/nginx.conf | 2 +- conf/production.yaml | 22 +++++++++++++++++++++- conf/systemd.service | 3 ++- manifest.json | 5 +++-- scripts/install | 29 ++++++++++++++++------------- scripts/remove | 5 +++-- scripts/restore | 2 +- scripts/upgrade | 6 +++--- 10 files changed, 63 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 87a9f1c..fff8871 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.0-beta.13** +Shipped Version: **1.0.0-beta.15** ## What is Peertube ? @@ -35,28 +35,28 @@ Want to see in action? ### Guidelines - 1. Require dedicated domain like **peertube.domain.tld**. - 1. No LDAP support (blocked until upstream implements it) - 1. URL can not be changed once selected. + 1. Require **dedicated domain** like **peertube.domain.tld**. + 1. **No LDAP** support (blocked until Peertube core upstream implements it) + 1. URL can not be changed once selected. Choose the domain wisely. 1. You need more then **1GB** of ram. If you don't have it, please create a **swap memory**. $ dd if=/dev/zero of=/swapfile bs=1024 count=1048576 $ mkswap /swapfile $ swapon /swapfile $ echo "/swapfile swap swap defaults 0 0" >> /etc/fstab - 1. This app is multi-instance (you can have more then one Peertube instance running on a YunoHost server) + 1. This app is **multi-instance** (you can have more then one Peertube instance running on a YunoHost server) -### Install +### Installing guide - 1. **App can be installed by YunoHost admin interface or by the following command:** + 1. App can be installed by YunoHost **admin web-interface** or by **running following command**: $ sudo yunohost app install https://github.com/YunoHost-Apps/peertube_ynh - 1. **root** is the admin username. - 1. **root Password** will be sent to the email address given at the time of the installation. + 1. Admin username is : **root**. + 1. **Admin password** will be sent to the email address given at the time of the installation. 1. **TLS** and **starttls** are disabled for the outgoing mails. If you intent to use email address not hosted on your local server,it's advised to have a proper SMTP configured with tls and starttls settings by editing **/var/www/peertube/config/porduction.yml**. - ### Updation - 1. **App can be updated by YunoHost admin interface or with the following command:** + ### Update Guide + 1. App can be updated by YunoHost **admin web-interface** or with the following command**: $ sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/peertube_ynh peertube diff --git a/conf/app.src b/conf/app.src index f5aea93..27a68ae 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.13/peertube-v1.0.0-beta.13.tar.xz -SOURCE_SUM=d23ebad3d1348a8fdf6ccaff81c16849045574578656ab7e676d4580c2da7383 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.15/peertube-v1.0.0-beta.15.tar.xz +SOURCE_SUM=fff45acc7cc84fc1847c0ed62fe2a64e683fe84b394cb64edb7a4b7fa9144da0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 18bcbec..2210a02 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -45,7 +45,7 @@ send_timeout 600; } - # Bypass PeerTube webseed route for better performances + # Bypass PeerTube for performance reasons. Could be removed location /static/webseed { # Clients usually have 4 simultaneous webseed connections, so the real limit is 3MB/s per client limit_rate 800k; diff --git a/conf/production.yaml b/conf/production.yaml index 3e051ca..a13fb47 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -2,7 +2,7 @@ listen: hostname: 'localhost' port: __PORT__ -# Correspond to your reverse proxy "listen" configuration +# Correspond to your reverse proxy server_name/listen configuration webserver: https: true hostname: '__domain__' @@ -67,6 +67,25 @@ search: trending: videos: interval_days: 7 # Compute trending videos for the last x days + +# Cache remote videos on your server, to help other instances to broadcast the video +# You can define multiple caches using different sizes/strategies +# Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following +redundancy: + videos: +# - +# size: '10GB' +# strategy: 'most-views' # Cache videos that have the most views +# - +# size: '10GB' +# strategy: 'trending' # Cache trending videos +# - + size: '1GB' + # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) + min_lifetime: '48 hours' + strategy: 'recently-added' # Cache recently added videos + minViews: 10 # Having at least x views + ############################################################################### @@ -94,6 +113,7 @@ admin: signup: enabled: false limit: 10 # When the limit is reached, registrations are disabled. -1 == unlimited + requires_email_verification: false filters: cidr: # You can specify CIDR ranges to whitelist (empty = no filtering) or blacklist whitelist: [] diff --git a/conf/systemd.service b/conf/systemd.service index 0fc291b..8f5be9d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,8 @@ Environment=NODE_ENV=production Environment=NODE_CONFIG_DIR=__FINALPATH__/config User=__APP__ Group=__APP__ -ExecStart=/bin/sh -c 'PATH=/opt/node_n/bin:$PATH exec npm start' +Environment="PATH=__ENV_PATH__" +ExecStart=/bin/sh -c ' npm start' WorkingDirectory=__FINALPATH__/ StandardOutput=syslog StandardError=syslog diff --git a/manifest.json b/manifest.json index 359a850..bfae4ab 100644 --- a/manifest.json +++ b/manifest.json @@ -3,9 +3,10 @@ "id": "peertube", "packaging_format": 1, "description": { - "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network" + "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", + "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.0.0-beta.13", + "version": "1.0.0-beta.15", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { diff --git a/scripts/install b/scripts/install index 06297cc..ae188e3 100644 --- a/scripts/install +++ b/scripts/install @@ -56,10 +56,10 @@ ynh_webpath_register "$app" "$domain" "$path_url" # STORE SETTINGS FROM MANIFEST #================================================= -ynh_app_setting_set "$app" domain "$domain" +ynh_app_setting_set "$app" domain "$domain" ynh_app_setting_set "$app" admin_email "$admin_email" -ynh_app_setting_set "$app" admin_pass "$admin_pass" -ynh_app_setting_set "$app" is_public "$is_public" +ynh_app_setting_set "$app" admin_pass "$admin_pass" +ynh_app_setting_set "$app" is_public "$is_public" #================================================= # STANDARD MODIFICATIONS @@ -90,18 +90,18 @@ mkdir -p "$datadir" # install nodejs ynh_install_nodejs 8 -# add backports for Debian Jessie (required to install ffmpeg) +# Add backports for Debian Jessie (required to install ffmpeg) if [ "$(lsb_release --codename --short)" == "jessie" ]; then echo "deb http://httpredir.debian.org/debian jessie-backports main" | tee /etc/apt/sources.list.d/jessie-backports.list fi -# add yarn repo for Debian +# Add yarn repo for Debian curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list ynh_package_update -# install postgresql, ffmpeg, redis -ynh_install_app_dependencies postgresql ffmpeg redis-server redis-tools mailutils yarn +# install dependencies +ynh_install_app_dependencies postgresql postgresql-contrib openssl g++ ffmpeg redis-server redis-tools mailutils yarn apt-transport-https #================================================= # DATABASE SETUP @@ -151,11 +151,11 @@ touch "$final_path/config/local-production.json" #================================================= # Create a dedicated nginx config -mkdir -p "/etc/nginx/conf.d/${domain}.d" +mkdir -p "/etc/nginx/conf.d/${domain}.d" # ( I don't remember why this is here, I think can be removed) ynh_add_nginx_config -# Set right permissions for curl install +# Set right permissions for the app chown -R "$app":"$app" "$datadir" # Reload Nginx @@ -214,10 +214,13 @@ chown -R "$app":"$app" "$final_path" "$datadir" systemctl reload nginx + + #================================================= # SETUP SYSTEMD #================================================= +ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service" # Create a dedicated systemd config ynh_add_systemd_config systemctl enable "$app" @@ -231,7 +234,7 @@ systemctl start "$app" ( cd "$final_path" sleep 30 - echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production PATH="/opt/node_n/bin:$PATH" npm run reset-password -- -u root + echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production npm run reset-password -- -u root ) #================================================= @@ -240,11 +243,11 @@ systemctl start "$app" message=" $app was successfully installed :) -Please open https://$domain$path_url +Please open your $app domain: https://$domain$path_url The admin username is: root -Here is the admin password: $admin_pass +The admin password is: $admin_pass -If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/peertube_ynh" +If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/peertube_ynh" ynh_send_readme_to_admin "$message" diff --git a/scripts/remove b/scripts/remove index 734a5d9..7b1b909 100644 --- a/scripts/remove +++ b/scripts/remove @@ -109,7 +109,8 @@ message="$app was successfully removed :) $app was successfully removed. The domain https://$domain$path_url is free for other apps to be installed on it. -But a futher action is required from your side to completely remove the $app data folder. If you are planing to restore the app in the future don't run the command given below. And if you are going to switch to othe server you will have to move /home/yunohost.app/$app to your new server. +But a futher action is required from your side to completely remove the $app data folder. If you have backup and plan to restore this app in the future DON'T RUN THIS COMMAND. +And if you are going to migrate to othe server you will have to move /home/yunohost.app/$app to your new server. You need to run this command to remove the data (warning all your videos will be removed) : @@ -117,6 +118,6 @@ You need to run this command to remove the data (warning all your videos will be rm -R /home/yunohost.app/$app -f -If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/peertube_ynh" +If you facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/peertube_ynh" ynh_send_readme_to_admin "$message" diff --git a/scripts/restore b/scripts/restore index b755f24..a3ea65c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -99,7 +99,7 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.lis ynh_package_update # install postgresql, ffmpeg, redis -ynh_install_app_dependencies postgresql ffmpeg redis-server redis-tools mailutils yarn +ynh_install_app_dependencies postgresql postgresql-contrib openssl g++ ffmpeg redis-server redis-tools mailutils yarn apt-transport-https #================================================= # RESTORE THE PostgreSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 44dfff5..1ff822b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,7 +105,7 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.lis ynh_package_update # install postgresql, ffmpeg, redis -ynh_install_app_dependencies postgresql ffmpeg redis-server redis-tools mailutils yarn +ynh_install_app_dependencies postgresql postgresql-contrib openssl g++ ffmpeg redis-server redis-tools mailutils yarn apt-transport-https #================================================= # CHECK THE PATH @@ -130,7 +130,7 @@ ynh_secure_remove "$tmpdir" ( cd "$final_path" - yarn install --production --pure-lockfile --silent --cache-folder /var/cache/yarn/ + yarn install --production --pure-lockfile ) @@ -172,7 +172,7 @@ ynh_use_logrotate --non-append #================================================= # SETUP SYSTEMD #================================================= - +ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service" # Create a dedicated systemd config ynh_add_systemd_config From 23972243ccb02f48c1830b826c3539dcf25401dd Mon Sep 17 00:00:00 2001 From: anmol26s Date: Wed, 3 Oct 2018 14:07:23 +0530 Subject: [PATCH 23/41] Updated to version 1.0.0-beta.16 --- README.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 1 + conf/production.yaml | 4 +++- manifest.json | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fff8871..749f686 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.0-beta.15** +Shipped Version: **1.0.0-beta.16** ## What is Peertube ? diff --git a/conf/app.src b/conf/app.src index 27a68ae..3025a81 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.15/peertube-v1.0.0-beta.15.tar.xz -SOURCE_SUM=fff45acc7cc84fc1847c0ed62fe2a64e683fe84b394cb64edb7a4b7fa9144da0 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.16/peertube-v1.0.0-beta.16.tar.xz +SOURCE_SUM=6cccb37d443d32ff83b10d285aa20c4e5c165d61ab5d83461bde3ffa6a4619af SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 2210a02..988923a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,3 +1,4 @@ + # Bypass PeerTube for performance reasons. Could be removed location ~ ^/client/(.*\.(js|css|woff2|otf|ttf|woff|eot))$ { add_header Cache-Control "public, max-age=31536000, immutable"; diff --git a/conf/production.yaml b/conf/production.yaml index a13fb47..c7e2b48 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -73,6 +73,8 @@ trending: # Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following redundancy: videos: + check_interval: '6 hour' # How often you want to check new videos to cache + strategies: # - # size: '10GB' # strategy: 'most-views' # Cache videos that have the most views @@ -162,7 +164,7 @@ instance: # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add '/' to "Disallow:' robots: | User-agent: * - Disallow: '' + Disallow: # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string. securitytxt: "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:" diff --git a/manifest.json b/manifest.json index bfae4ab..b457277 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.0.0-beta.15", + "version": "1.0.0-beta.16", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From 64427abbea0c28f803e944e88c60c535c500e68b Mon Sep 17 00:00:00 2001 From: anmol26s Date: Wed, 3 Oct 2018 14:25:36 +0530 Subject: [PATCH 24/41] Removed reduency from producton.yaml --- conf/production.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/conf/production.yaml b/conf/production.yaml index c7e2b48..c827ef9 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -71,10 +71,10 @@ trending: # Cache remote videos on your server, to help other instances to broadcast the video # You can define multiple caches using different sizes/strategies # Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following -redundancy: - videos: - check_interval: '6 hour' # How often you want to check new videos to cache - strategies: +#redundancy: +# videos: +# check_interval: '6 hour' # How often you want to check new videos to cache +# strategies: # - # size: '10GB' # strategy: 'most-views' # Cache videos that have the most views @@ -82,11 +82,11 @@ redundancy: # size: '10GB' # strategy: 'trending' # Cache trending videos # - - size: '1GB' +# size: '1GB' # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) - min_lifetime: '48 hours' - strategy: 'recently-added' # Cache recently added videos - minViews: 10 # Having at least x views +# min_lifetime: '48 hours' +# strategy: 'recently-added' # Cache recently added videos +# minViews: 10 # Having at least x views From 6fc4efb84533f077c83ebe54388ce1df741d40fd Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Wed, 3 Oct 2018 17:07:41 +0530 Subject: [PATCH 25/41] Updated to version 1.0.0-beta.16 (#48) * Updated dependencies and typos * [add] French description Description is missing in French apps list. * Updated to version 1.0.0-beta.15 * Fix systemd and redundancy (#46) * fixed env in systemd * changed path while creating password * changed path while creating password * changed path while creating password * changed path while creating password * Path in systemd * Fixed yarn in upgrade * Updated to version 1.0.0-beta.16 * Removed reduency from producton.yaml --- README.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 1 + conf/production.yaml | 18 +++++++++--------- manifest.json | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fff8871..749f686 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.0-beta.15** +Shipped Version: **1.0.0-beta.16** ## What is Peertube ? diff --git a/conf/app.src b/conf/app.src index 27a68ae..3025a81 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.15/peertube-v1.0.0-beta.15.tar.xz -SOURCE_SUM=fff45acc7cc84fc1847c0ed62fe2a64e683fe84b394cb64edb7a4b7fa9144da0 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.16/peertube-v1.0.0-beta.16.tar.xz +SOURCE_SUM=6cccb37d443d32ff83b10d285aa20c4e5c165d61ab5d83461bde3ffa6a4619af SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 2210a02..988923a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,3 +1,4 @@ + # Bypass PeerTube for performance reasons. Could be removed location ~ ^/client/(.*\.(js|css|woff2|otf|ttf|woff|eot))$ { add_header Cache-Control "public, max-age=31536000, immutable"; diff --git a/conf/production.yaml b/conf/production.yaml index a13fb47..fcbd937 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -71,8 +71,10 @@ trending: # Cache remote videos on your server, to help other instances to broadcast the video # You can define multiple caches using different sizes/strategies # Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following -redundancy: - videos: +#redundancy: +# videos: +# check_interval: '6 hour' # How often you want to check new videos to cache +# strategies: # - # size: '10GB' # strategy: 'most-views' # Cache videos that have the most views @@ -80,13 +82,11 @@ redundancy: # size: '10GB' # strategy: 'trending' # Cache trending videos # - - size: '1GB' +# size: '1GB' # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) - min_lifetime: '48 hours' - strategy: 'recently-added' # Cache recently added videos - minViews: 10 # Having at least x views - - +# min_lifetime: '48 hours' +# strategy: 'recently-added' # Cache recently added videos +# minViews: 10 # Having at least x views ############################################################################### # @@ -162,7 +162,7 @@ instance: # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add '/' to "Disallow:' robots: | User-agent: * - Disallow: '' + Disallow: # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string. securitytxt: "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:" diff --git a/manifest.json b/manifest.json index bfae4ab..b457277 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.0.0-beta.15", + "version": "1.0.0-beta.16", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From 8c7183befe4fb32acd6128f35478adf3655aaf6c Mon Sep 17 00:00:00 2001 From: anmol26s Date: Thu, 4 Oct 2018 04:36:09 +0530 Subject: [PATCH 26/41] Updated to version 1.0.0-rc.2 --- README.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 749f686..52eef5f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.0-beta.16** +Shipped Version: **1.0.0-rc.2** ## What is Peertube ? diff --git a/conf/app.src b/conf/app.src index 3025a81..7c34579 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.16/peertube-v1.0.0-beta.16.tar.xz -SOURCE_SUM=6cccb37d443d32ff83b10d285aa20c4e5c165d61ab5d83461bde3ffa6a4619af +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-rc.2/peertube-v1.0.0-rc.2.tar.xz +SOURCE_SUM=3222dff35dd6784001732e3599f435fb58a7304acffe12a7c19c59a4ee88bbc0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index b457277..f396cdb 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.0.0-beta.16", + "version": "1.0.0-rc.2", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From 93636c227dfd6d6b74790d31cecdfc0884887afb Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Thu, 4 Oct 2018 05:03:26 +0530 Subject: [PATCH 27/41] Testing 1.0.0-rc.2 (#49) * Updated dependencies and typos * [add] French description Description is missing in French apps list. * Updated to version 1.0.0-beta.15 * Fix systemd and redundancy (#46) * fixed env in systemd * changed path while creating password * changed path while creating password * changed path while creating password * changed path while creating password * Path in systemd * Fixed yarn in upgrade * Updated to version 1.0.0-beta.16 * Removed reduency from producton.yaml * Updated to version 1.0.0-rc.2 --- README.md | 3 +-- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 749f686..f43e1a8 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.0-beta.16** - +Shipped Version: **1.0.0-rc.2** ## What is Peertube ? PeerTube is a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser, using WebTorrent. diff --git a/conf/app.src b/conf/app.src index 3025a81..7c34579 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.16/peertube-v1.0.0-beta.16.tar.xz -SOURCE_SUM=6cccb37d443d32ff83b10d285aa20c4e5c165d61ab5d83461bde3ffa6a4619af +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-rc.2/peertube-v1.0.0-rc.2.tar.xz +SOURCE_SUM=3222dff35dd6784001732e3599f435fb58a7304acffe12a7c19c59a4ee88bbc0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index b457277..f396cdb 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.0.0-beta.16", + "version": "1.0.0-rc.2", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From 4e82c4dd55a795897d1714d2382a0d2ae2af8eef Mon Sep 17 00:00:00 2001 From: liberodark Date: Thu, 11 Oct 2018 18:32:22 +0200 Subject: [PATCH 28/41] Updated to version 1.0.0 * Update README.md * Update manifest.json * Update app.src * Update app.src --- README.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f43e1a8..87cc765 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.0-rc.2** +Shipped Version: **1.0.0** ## What is Peertube ? PeerTube is a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser, using WebTorrent. diff --git a/conf/app.src b/conf/app.src index 7c34579..e641fc0 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-rc.2/peertube-v1.0.0-rc.2.tar.xz -SOURCE_SUM=3222dff35dd6784001732e3599f435fb58a7304acffe12a7c19c59a4ee88bbc0 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0/peertube-v1.0.0.tar.xz +SOURCE_SUM=1d101e96e81dffc0dee10fb07c525881c62f70a1859b5f804450fe68e09cb1a1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index f396cdb..ca5c0a4 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.0.0-rc.2", + "version": "1.0.0", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From 07bdd9d791727dcb54cffb050ecfd37e449cc4b8 Mon Sep 17 00:00:00 2001 From: anmol Date: Thu, 25 Oct 2018 21:41:27 +0530 Subject: [PATCH 29/41] Updated to version 1.0.1 --- README.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 87cc765..22a22d4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.0** +Shipped Version: **1.0.1** ## What is Peertube ? PeerTube is a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser, using WebTorrent. diff --git a/conf/app.src b/conf/app.src index e641fc0..c7fea0c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0/peertube-v1.0.0.tar.xz -SOURCE_SUM=1d101e96e81dffc0dee10fb07c525881c62f70a1859b5f804450fe68e09cb1a1 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.1/peertube-v1.0.1.tar.xz +SOURCE_SUM=9db6d9347160444b5fde81a843d7f2972352e3cdf3c0baf7d85dc775c164a688 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index ca5c0a4..a4a0f9a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.0.0", + "version": "1.0.1", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From 0c6e247773cdc85ce1385ed6ec274aa3fb505d18 Mon Sep 17 00:00:00 2001 From: anmol Date: Mon, 19 Nov 2018 15:19:49 +0530 Subject: [PATCH 30/41] Security:Do not open port for the app --- scripts/install | 3 --- scripts/restore | 3 --- scripts/upgrade | 11 +++++++++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index ae188e3..dac27a5 100644 --- a/scripts/install +++ b/scripts/install @@ -69,9 +69,6 @@ ynh_app_setting_set "$app" is_public "$is_public" # Find a free port port=$(ynh_find_port 9000) - -# Open this port -yunohost firewall allow Both "$port" 2>&1 ynh_app_setting_set "$app" port "$port" #================================================= diff --git a/scripts/restore b/scripts/restore index a3ea65c..8c0141b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -62,9 +62,6 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file "$final_path" -# Open this port -yunohost firewall allow Both "$port" 2>&1 - #================================================= # RECREATE THE DEDICATED USER #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1ff822b..6f1e313 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,8 +77,15 @@ datadir="/home/yunohost.app/${app}/storage" # Create app folders mkdir -p "$datadir" -# Open this port -yunohost firewall allow Both "$port" 2>&1 +#================================================= +# CLOSE A PORT +#================================================= + +if yunohost firewall list | grep -q "\- $port$" +then + echo "Close port $port" + yunohost firewall disallow Both "$port" 2>&1 +fi #================================================= # CREATE DEDICATED USER From fa0cafeb983f31f46f0603ac0e0facb6c6545581 Mon Sep 17 00:00:00 2001 From: anmol Date: Thu, 22 Nov 2018 01:52:42 +0530 Subject: [PATCH 31/41] Create data directory if it do not exits while restore --- scripts/restore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/restore b/scripts/restore index 8c0141b..1512bc2 100644 --- a/scripts/restore +++ b/scripts/restore @@ -74,6 +74,9 @@ ynh_system_user_create "$app" #================================================= # Set right permissions +if [ ! -d "/home/yunohost.app/$app" ]; then + mkdir -p "/home/yunohost.app/${app}/storage" +fi chown -R "$app":"$app" "/home/yunohost.app/${app}/storage" #================================================= From 1b31e5c42a07009dbd6f22d499f50183a87ab4b7 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Tue, 11 Dec 2018 03:05:24 +0530 Subject: [PATCH 32/41] Updated to version 1.1.0 --- README.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 24 +++++++++++++++++++----- conf/production.yaml | 9 ++++++--- conf/systemd.service | 14 ++++++++++++++ manifest.json | 2 +- 6 files changed, 43 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 22a22d4..3b11493 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.0.1** +Shipped Version: **1.1.0** ## What is Peertube ? PeerTube is a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser, using WebTorrent. diff --git a/conf/app.src b/conf/app.src index c7fea0c..feb4c89 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.1/peertube-v1.0.1.tar.xz -SOURCE_SUM=9db6d9347160444b5fde81a843d7f2972352e3cdf3c0baf7d85dc775c164a688 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.1.0/peertube-v1.1.0.tar.xz +SOURCE_SUM=b775bab2bb9f9a957b7f4decc1d3372bf209628cede7e0a6a908bc0d6f4eb595 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 988923a..541f2f1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,10 +1,10 @@ - # Bypass PeerTube for performance reasons. Could be removed + # Bypass PeerTube for performance reasons. Could be removed location ~ ^/client/(.*\.(js|css|woff2|otf|ttf|woff|eot))$ { add_header Cache-Control "public, max-age=31536000, immutable"; alias __FINALPATH__/client/dist/$1; } - + # Bypass PeerTube for performance reasons. Could be removed location ~ ^/static/(thumbnails|avatars)/ { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; @@ -37,8 +37,17 @@ proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # Hard limit, PeerTube does not support videos > 8GB + + # This is the maximum upload size, which roughly matches the maximum size of a video file + # you can send via the API or the web interface. By default this is 8GB, but administrators + # can increase or decrease the limit. Currently there's no way to communicate this limit + # to users automatically, so you may want to leave a note in your instance 'about' page if + # you change this. + # + # Note that temporary space is needed equal to the total size of all concurrent uploads. + # This data gets stored in /var/lib/nginx by default, so you may want to put this directory + # on a dedicated filesystem. + # client_max_body_size 8G; proxy_connect_timeout 600; proxy_send_timeout 600; @@ -70,7 +79,12 @@ access_log off; } - alias /home/yunohost.app/__NAME__/storage/videos; + root /home/yunohost.app/__NAME__/storage/videos; + + rewrite ^/static/webseed/(.*)$ /videos/$1 break; + rewrite ^/static/redundancy/(.*)$ /redundancy/$1 break; + + try_files $uri /; } # Websocket tracker diff --git a/conf/production.yaml b/conf/production.yaml index fcbd937..a901947 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -60,7 +60,10 @@ log: level: 'info' # debug/info/warning/error search: - remote_uri: # Add ability to search remote videos/actors by URI, that may not be federated with your instance +# Add ability to fetch remote videos/actors by their URI, that may not be federated with your instance +# If enabled, the associated group will be able to "escape" from the instance follows +# That means they will be able to follow channels, watch videos, list videos of non followed instances + remote_uri: users: true anonymous: false @@ -83,10 +86,10 @@ trending: # strategy: 'trending' # Cache trending videos # - # size: '1GB' - # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) +# # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) # min_lifetime: '48 hours' # strategy: 'recently-added' # Cache recently added videos -# minViews: 10 # Having at least x views +# min_views: 10 # Having at least x views ############################################################################### # diff --git a/conf/systemd.service b/conf/systemd.service index 8f5be9d..db0da40 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -16,5 +16,19 @@ StandardError=syslog SyslogIdentifier=__APP__ Restart=always +; Some security directives. +; Use private /tmp and /var/tmp folders inside a new file system namespace, +; which are discarded after the process stops. +PrivateTmp=true +; Mount /usr, /boot, and /etc as read-only for processes invoked by this service. +ProtectSystem=full +; Sets up a new /dev mount for the process and only adds API pseudo devices +; like /dev/null, /dev/zero or /dev/random but not physical devices. Disabled +; by default because it may not work on devices like the Raspberry Pi. +PrivateDevices=false +; Ensures that the service process and all its children can never gain new +; privileges through execve(). +NoNewPrivileges=true + [Install] WantedBy=multi-user.target diff --git a/manifest.json b/manifest.json index a4a0f9a..7d8d9c7 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.0.1", + "version": "1.1.0", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From d083cb7dc6cdc1f399755450a2c5b420ce8b1f0a Mon Sep 17 00:00:00 2001 From: anmol26s Date: Sun, 23 Dec 2018 21:31:11 +0530 Subject: [PATCH 33/41] Fix:local videos not playing https://github.com/YunoHost-Apps/peertube_ynh/issues/65 --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 541f2f1..4811e36 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -79,7 +79,7 @@ access_log off; } - root /home/yunohost.app/__NAME__/storage/videos; + root /home/yunohost.app/__NAME__/storage; rewrite ^/static/webseed/(.*)$ /videos/$1 break; rewrite ^/static/redundancy/(.*)$ /redundancy/$1 break; From 7dc5b679ca17874a794742e27a2fd44ed3b904cf Mon Sep 17 00:00:00 2001 From: anmol Date: Wed, 9 Jan 2019 11:38:29 +0530 Subject: [PATCH 34/41] Updated to version 1.1.0 --- conf/nginx.conf | 18 +++--------------- conf/systemd.service | 14 -------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 4811e36..1046098 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -38,16 +38,7 @@ proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # This is the maximum upload size, which roughly matches the maximum size of a video file - # you can send via the API or the web interface. By default this is 8GB, but administrators - # can increase or decrease the limit. Currently there's no way to communicate this limit - # to users automatically, so you may want to leave a note in your instance 'about' page if - # you change this. - # - # Note that temporary space is needed equal to the total size of all concurrent uploads. - # This data gets stored in /var/lib/nginx by default, so you may want to put this directory - # on a dedicated filesystem. - # + # Hard limit, PeerTube does not support videos > 8GB client_max_body_size 8G; proxy_connect_timeout 600; proxy_send_timeout 600; @@ -79,12 +70,9 @@ access_log off; } - root /home/yunohost.app/__NAME__/storage; + alias /home/yunohost.app/__NAME__/storage/videos; - rewrite ^/static/webseed/(.*)$ /videos/$1 break; - rewrite ^/static/redundancy/(.*)$ /redundancy/$1 break; - - try_files $uri /; + } # Websocket tracker diff --git a/conf/systemd.service b/conf/systemd.service index db0da40..8f5be9d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -16,19 +16,5 @@ StandardError=syslog SyslogIdentifier=__APP__ Restart=always -; Some security directives. -; Use private /tmp and /var/tmp folders inside a new file system namespace, -; which are discarded after the process stops. -PrivateTmp=true -; Mount /usr, /boot, and /etc as read-only for processes invoked by this service. -ProtectSystem=full -; Sets up a new /dev mount for the process and only adds API pseudo devices -; like /dev/null, /dev/zero or /dev/random but not physical devices. Disabled -; by default because it may not work on devices like the Raspberry Pi. -PrivateDevices=false -; Ensures that the service process and all its children can never gain new -; privileges through execve(). -NoNewPrivileges=true - [Install] WantedBy=multi-user.target From 222a1076a2d605ee805410227cfcbc36b9a35429 Mon Sep 17 00:00:00 2001 From: Taekiro Date: Sun, 3 Feb 2019 13:51:40 +0100 Subject: [PATCH 35/41] Typo in the installing guide --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b11493..734f89b 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Want to see in action? $ sudo yunohost app install https://github.com/YunoHost-Apps/peertube_ynh 1. Admin username is : **root**. 1. **Admin password** will be sent to the email address given at the time of the installation. - 1. **TLS** and **starttls** are disabled for the outgoing mails. If you intent to use email address not hosted on your local server,it's advised to have a proper SMTP configured with tls and starttls settings by editing **/var/www/peertube/config/porduction.yml**. + 1. **TLS** and **starttls** are disabled for the outgoing mails. If you intent to use email address not hosted on your local server,it's advised to have a proper SMTP configured with tls and starttls settings by editing **/var/www/peertube/config/production.yml**. ### Update Guide 1. App can be updated by YunoHost **admin web-interface** or with the following command**: From 33a4eabbfdb5ac254f95019c197a2f373663553d Mon Sep 17 00:00:00 2001 From: anmol Date: Fri, 8 Feb 2019 00:48:54 +0530 Subject: [PATCH 36/41] Updated to version 1.2.0 --- README.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 47 +++++++++++++++++++++++++++++++++++++++++--- conf/production.yaml | 11 +++++++++++ conf/systemd.service | 19 ++++++++++++++++++ manifest.json | 2 +- 6 files changed, 78 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3b11493..85629c7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.1.0** +Shipped Version: **1.2.0** ## What is Peertube ? PeerTube is a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser, using WebTorrent. diff --git a/conf/app.src b/conf/app.src index feb4c89..7d3a43a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.1.0/peertube-v1.1.0.tar.xz -SOURCE_SUM=b775bab2bb9f9a957b7f4decc1d3372bf209628cede7e0a6a908bc0d6f4eb595 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.2.0/peertube-v1.2.0.tar.xz +SOURCE_SUM=2ef5c4d0cf1f0f8a71e0b1f5a5146fbf4a9617ea79f32de618fe3b3c726d8f7e SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 1046098..10c6d5a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -38,7 +38,16 @@ proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # Hard limit, PeerTube does not support videos > 8GB + # This is the maximum upload size, which roughly matches the maximum size of a video file + # you can send via the API or the web interface. By default this is 8GB, but administrators + # can increase or decrease the limit. Currently there's no way to communicate this limit + # to users automatically, so you may want to leave a note in your instance 'about' page if + # you change this. + # + # Note that temporary space is needed equal to the total size of all concurrent uploads. + # This data gets stored in /var/lib/nginx by default, so you may want to put this directory + # on a dedicated filesystem. + # client_max_body_size 8G; proxy_connect_timeout 600; proxy_send_timeout 600; @@ -47,7 +56,7 @@ } # Bypass PeerTube for performance reasons. Could be removed - location /static/webseed { + location ~ ^/static/(webseed|redundancy)/ { # Clients usually have 4 simultaneous webseed connections, so the real limit is 3MB/s per client limit_rate 800k; @@ -70,7 +79,12 @@ access_log off; } - alias /home/yunohost.app/__NAME__/storage/videos; + root /home/yunohost.app/__NAME__/storage; + + rewrite ^/static/webseed/(.*)$ /videos/$1 break; + rewrite ^/static/redundancy/(.*)$ /redundancy/$1 break; + + try_files $uri /; } @@ -87,3 +101,30 @@ proxy_set_header Host $host; proxy_pass http://localhost:__PORT__; } + +location /socket.io { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + + proxy_pass http://localhost:__PORT__; + + # enable WebSockets + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } +} + + © 2019 GitHub, Inc. + Terms + Privacy + Security + Status + Help + + Contact GitHub + Pricing + API + Training + Blog + About diff --git a/conf/production.yaml b/conf/production.yaml index a901947..0454369 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -47,8 +47,10 @@ smtp: # From the project root directory storage: + tmp: '/home/yunohost.app/__app__/storage/tmp/' # Used to download data (imports etc), store uploaded files before processing... avatars: '/home/yunohost.app/__app__/storage/avatars/' videos: '/home/yunohost.app/__app__/storage/videos/' + redundancy: '/home/yunohost.app/__app__/storage/videos/' logs: '/home/yunohost.app/__app__/storage/logs/' previews: '/home/yunohost.app/__app__/storage/previews/' thumbnails: '/home/yunohost.app/__app__/storage/thumbnails/' @@ -111,8 +113,13 @@ cache: admin: + # Used to generate the root user at first startup + # And to receive emails from the contact form email: '__email__' +contact_form: + enabled: true + signup: enabled: false limit: 10 # When the limit is reached, registrations are disabled. -1 == unlimited @@ -133,6 +140,8 @@ user: # Please, do not disable transcoding since many uploaded videos will not work transcoding: enabled: true + # Allow your users to upload .mkv, .mov, .avi, .flv videos + allow_additional_extensions: true threads: 1 resolutions: # Only created if the original video has a higher resolution, uses more storage! 240p: false @@ -171,6 +180,8 @@ instance: "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:" services: + # You can provide a reporting endpoint for Content Security Policy violations + csp-logger: # Cards configuration to format video in Twitter twitter: username: '@yunohost' # Indicates the Twitter account for the website or platform on which the content was published diff --git a/conf/systemd.service b/conf/systemd.service index 8f5be9d..85dd1b8 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -16,5 +16,24 @@ StandardError=syslog SyslogIdentifier=__APP__ Restart=always +; Some security directives. +; Use private /tmp and /var/tmp folders inside a new file system namespace, +; which are discarded after the process stops. +PrivateTmp=true +; Mount /usr, /boot, and /etc as read-only for processes invoked by this service. +ProtectSystem=full +; Sets up a new /dev mount for the process and only adds API pseudo devices +; like /dev/null, /dev/zero or /dev/random but not physical devices. Disabled +; by default because it may not work on devices like the Raspberry Pi. +PrivateDevices=false +; Ensures that the service process and all its children can never gain new +; privileges through execve(). +NoNewPrivileges=true +; This makes /home, /root, and /run/user inaccessible and empty for processes invoked +; by this unit. Make sure that you do not depend on data inside these folders. +ProtectHome=false +; Drops the sys admin capability from the daemon. +CapabilityBoundingSet=~CAP_SYS_ADMIN + [Install] WantedBy=multi-user.target diff --git a/manifest.json b/manifest.json index 7d8d9c7..33d9c95 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.1.0", + "version": "1.2.0", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From ee111f67a5cecbe31594ab471f699aa348ae1ed8 Mon Sep 17 00:00:00 2001 From: anmol Date: Fri, 8 Feb 2019 01:00:42 +0530 Subject: [PATCH 37/41] Fixed nginx config --- conf/nginx.conf | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 10c6d5a..71e59d3 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -113,18 +113,6 @@ location /socket.io { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } -} - © 2019 GitHub, Inc. - Terms - Privacy - Security - Status - Help - Contact GitHub - Pricing - API - Training - Blog - About + From cc6baaaaafd358b7580487efcf371fb26469d44f Mon Sep 17 00:00:00 2001 From: liberodark Date: Mon, 18 Feb 2019 19:06:43 +0100 Subject: [PATCH 38/41] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85629c7..aca6068 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Install Peertube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)

======= -Shipped Version: **1.2.0** +Shipped Version: **1.2.1** ## What is Peertube ? PeerTube is a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser, using WebTorrent. From 32cb571814ab533d772d86d2afca3d374a9c5dad Mon Sep 17 00:00:00 2001 From: liberodark Date: Mon, 18 Feb 2019 19:07:04 +0100 Subject: [PATCH 39/41] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 33d9c95..bfddcab 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "1.2.0", + "version": "1.2.1", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": { From 8d23f589d260d112401c1d369d6a2749f57b413d Mon Sep 17 00:00:00 2001 From: liberodark Date: Mon, 18 Feb 2019 19:08:09 +0100 Subject: [PATCH 40/41] Update app.src --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index 7d3a43a..e463f7a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.2.0/peertube-v1.2.0.tar.xz -SOURCE_SUM=2ef5c4d0cf1f0f8a71e0b1f5a5146fbf4a9617ea79f32de618fe3b3c726d8f7e +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.2.1/peertube-v1.2.1.tar.xz +SOURCE_SUM=77517c06133704e36b755bdae4f68838221e657ca70a1a40d5c8652655978ed5 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true From f19d361d38a6f4497633573f8cbb9e3256a025b4 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 26 Apr 2019 17:05:06 +0200 Subject: [PATCH 41/41] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'scripts/inst?= =?UTF-8?q?all'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index dac27a5..44a5d11 100644 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,7 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -path_url="/" +path_url="/peertube" admin_email=$YNH_APP_ARG_EMAIL admin_pass=$(ynh_string_random 24) is_public=$YNH_APP_ARG_IS_PUBLIC