From a04d4cae28421082458106483bf9101a9009fbb0 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Mon, 1 Oct 2018 07:35:45 +0530 Subject: [PATCH 01/18] Added yarn-upgrade-all for ovh issue --- scripts/install | 2 ++ scripts/upgrade | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/install b/scripts/install index ae188e3..923e9b4 100644 --- a/scripts/install +++ b/scripts/install @@ -143,6 +143,8 @@ touch "$final_path/config/local-production.json" ( cd "$final_path" + yarn global add yarn-upgrade-all + yarn-upgrade-all yarn install --production --pure-lockfile ) diff --git a/scripts/upgrade b/scripts/upgrade index 1ff822b..c34a175 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -130,6 +130,8 @@ ynh_secure_remove "$tmpdir" ( cd "$final_path" + yarn global add yarn-upgrade-all + yarn-upgrade-all yarn install --production --pure-lockfile ) From 696e2c8ebd86eb3038d70cafca6a4ebe76f161da Mon Sep 17 00:00:00 2001 From: anmol26s Date: Mon, 1 Oct 2018 08:28:41 +0530 Subject: [PATCH 02/18] Removed password --- scripts/install | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/scripts/install b/scripts/install index 923e9b4..8977f33 100644 --- a/scripts/install +++ b/scripts/install @@ -228,28 +228,4 @@ ynh_add_systemd_config systemctl enable "$app" systemctl start "$app" -#================================================= -# CHANGE PEERTUBE ADMIN PASSWORD AFTER INITIAL GEN -#================================================= -# we need to wait for the service to init peertube's database -( - cd "$final_path" - sleep 30 - echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production npm run reset-password -- -u root -) - -#================================================= -# SEND A README FOR THE ADMIN -#================================================= - -message=" $app was successfully installed :) - -Please open your $app domain: https://$domain$path_url - -The admin username is: root -The admin password is: $admin_pass - -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" From 6c9890095f1cf880b502380d8fd9c51bce8fff91 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Mon, 1 Oct 2018 10:15:46 +0530 Subject: [PATCH 03/18] Removed password --- scripts/install | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/install b/scripts/install index 8977f33..37bccd8 100644 --- a/scripts/install +++ b/scripts/install @@ -141,12 +141,6 @@ ynh_setup_source "$final_path" cp ../conf/production.yaml "$final_path/config/production.yaml" touch "$final_path/config/local-production.json" -( - cd "$final_path" - yarn global add yarn-upgrade-all - yarn-upgrade-all - yarn install --production --pure-lockfile -) #================================================= # NGINX CONFIGURATION From 579eed26099438678e61960ad727e554ecdbeec8 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Mon, 1 Oct 2018 10:37:08 +0530 Subject: [PATCH 04/18] Removed password --- scripts/restore | 7 ------- scripts/upgrade | 9 --------- 2 files changed, 16 deletions(-) diff --git a/scripts/restore b/scripts/restore index a3ea65c..5ad4961 100644 --- a/scripts/restore +++ b/scripts/restore @@ -85,8 +85,6 @@ chown -R "$app":"$app" "/home/yunohost.app/${app}/storage" # REINSTALL DEPENDENCIES #================================================= -# install nodejs -ynh_install_nodejs 8 # add backports for Debian Jessie (required to install ffmpeg) if [ "$(lsb_release --codename --short)" == "jessie" ]; then @@ -128,11 +126,6 @@ ynh_restore_file "/etc/logrotate.d/$app" # RESTORE THE LOGROTATE CONFIGURATION #================================================= -( - cd "$final_path" - yarn install --production --pure-lockfile --silent --cache-folder /var/cache/yarn/ -) - # Set right permissions chown -R "$app":"$app" "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index c34a175..bfd1bfe 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -91,8 +91,6 @@ ynh_system_user_create "$app" # INSTALL DEPENDENCIES #================================================= -# install nodejs -ynh_install_nodejs 8 # add backports for Debian Jessie (required to install ffmpeg) if [ "$(lsb_release --codename --short)" == "jessie" ]; then @@ -128,13 +126,6 @@ cp -a "$tmpdir/local-production.json" "$final_path/config/local-production.json # Remove the tmp directory securely ynh_secure_remove "$tmpdir" -( - cd "$final_path" - yarn global add yarn-upgrade-all - yarn-upgrade-all - yarn install --production --pure-lockfile -) - #================================================= # NGINX CONFIGURATION From 9a9716ce608fe595cb451f1b70ecea74b82ebf59 Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Mon, 1 Oct 2018 11:15:21 +0530 Subject: [PATCH 05/18] Updated redme for ovh --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/README.md b/README.md index fff8871..685ff23 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,55 @@ Shipped Version: **1.0.0-beta.15** +# Nodejs branch for servers giving error on yarn install (OVH) + +You will have to run few **commands in the terminal to run Peertube**. **Nodejs** will not be installed by **shell** and **passowrd** will not be created by shell. So you have to do these **things manually**. + +## Steps for installing + +1. Install **nodejs** + + $ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
+ $ sudo apt-get install -y nodejs +1. Install the peertube with **OVH fix** branch. + + $ yunohost app install --debug https://github.com/YunoHost-Apps/peertube_ynh/edit/ovh_fix +1. After installation is complete run **yarn install**. + + $ cd /var/www/peertube && yarn install --production --pure-lockfile +1. Give proper **permissions** to peertube + + $ chwon -R peertube:peertube /var/www/peertube +1. **Restart peertube** and check if there is any error message. + + $ service peertube restart + $ journalctl -feu peertube +1. If there is no **error in red** in the last lines of log. Press **ctrl+c** to stop the logs. +1. Go to your **domain** to check if peertube is running and everthing is ok. +1. Change your **root password** by this command: + + $ cd /var/www/peertube && NODE_CONFIG_DIR="/var/www/peertube/config/" NODE_ENV=production /opt/node_n/bin/npm run reset-password -- -u root + + Username: **root** + password: **created in above step** + +## Updating peertube +1. Stop peertube + + $ service peertube stop +1. Upgrade the package: + + $ yunohost app upgrade -u https://github.com/YunoHost-Apps/peertube_ynh/edit/ovh_fix/ +1. After installation is complete run **yarn install**. + + $ cd /var/www/peertube && yarn install --production --pure-lockfile +1. Give proper **permissions** to peertube + + $ chwon -R peertube:peertube /var/www/peertube +1. Start service. + + $ service peertub peerutbe + ## What is Peertube ? PeerTube is a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser, using WebTorrent. From 8bb4dcf9c9bf20fa52fda13d8a5ca2ac4c776d7b Mon Sep 17 00:00:00 2001 From: anmol26s Date: Wed, 3 Oct 2018 17:00:10 +0530 Subject: [PATCH 06/18] Updated to version 1.0.0-beta.16 --- README.md | 10 +++++----- conf/app.src | 4 ++-- conf/nginx.conf | 1 + conf/production.yaml | 16 +++++++++------- manifest.json | 2 +- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 685ff23..dadc938 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** # Nodejs branch for servers giving error on yarn install (OVH) @@ -18,7 +18,7 @@ You will have to run few **commands in the terminal to run Peertube**. **Nodejs* $ sudo apt-get install -y nodejs 1. Install the peertube with **OVH fix** branch. - $ yunohost app install --debug https://github.com/YunoHost-Apps/peertube_ynh/edit/ovh_fix + $ yunohost app --debug install --debug https://github.com/YunoHost-Apps/peertube_ynh/tree/ovh_fix 1. After installation is complete run **yarn install**. $ cd /var/www/peertube && yarn install --production --pure-lockfile @@ -33,7 +33,7 @@ You will have to run few **commands in the terminal to run Peertube**. **Nodejs* 1. Go to your **domain** to check if peertube is running and everthing is ok. 1. Change your **root password** by this command: - $ cd /var/www/peertube && NODE_CONFIG_DIR="/var/www/peertube/config/" NODE_ENV=production /opt/node_n/bin/npm run reset-password -- -u root + $ cd /var/www/peertube && NODE_CONFIG_DIR="/var/www/peertube/config/" NODE_ENV=production npm run reset-password -- -u root Username: **root** password: **created in above step** @@ -44,7 +44,7 @@ You will have to run few **commands in the terminal to run Peertube**. **Nodejs* $ service peertube stop 1. Upgrade the package: - $ yunohost app upgrade -u https://github.com/YunoHost-Apps/peertube_ynh/edit/ovh_fix/ + $ yunohost app upgrade --debug -u https://github.com/YunoHost-Apps/peertube_ynh/tree/ovh_fix peertube 1. After installation is complete run **yarn install**. $ cd /var/www/peertube && yarn install --production --pure-lockfile @@ -53,7 +53,7 @@ You will have to run few **commands in the terminal to run Peertube**. **Nodejs* $ chwon -R peertube:peertube /var/www/peertube 1. Start service. - $ service peertub peerutbe + $ service peertube start ## 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..c827ef9 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,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 @@ -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 849837d78b68a8fec0e27c60188df9ffb315be37 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Thu, 4 Oct 2018 05:09:58 +0530 Subject: [PATCH 07/18] 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 dadc938..e58aa07 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** # Nodejs branch for servers giving error on yarn install (OVH) 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 749795f5b0a04dca526b93f2944a1c49dfe28d8e Mon Sep 17 00:00:00 2001 From: Samuel Vermeulen <43654922+samvermeulenpro@users.noreply.github.com> Date: Thu, 11 Oct 2018 18:54:58 +0200 Subject: [PATCH 08/18] Fix syntaxe --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e58aa07..4903cbc 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,11 @@ You will have to run few **commands in the terminal to run Peertube**. **Nodejs* $ cd /var/www/peertube && yarn install --production --pure-lockfile 1. Give proper **permissions** to peertube - $ chwon -R peertube:peertube /var/www/peertube + $ chown -R peertube:peertube /var/www/peertube 1. **Restart peertube** and check if there is any error message. - $ service peertube restart - $ journalctl -feu peertube + $ service peertube restart && journalctl -feu peertube + 1. If there is no **error in red** in the last lines of log. Press **ctrl+c** to stop the logs. 1. Go to your **domain** to check if peertube is running and everthing is ok. 1. Change your **root password** by this command: @@ -50,7 +50,7 @@ You will have to run few **commands in the terminal to run Peertube**. **Nodejs* $ cd /var/www/peertube && yarn install --production --pure-lockfile 1. Give proper **permissions** to peertube - $ chwon -R peertube:peertube /var/www/peertube + $ chown -R peertube:peertube /var/www/peertube 1. Start service. $ service peertube start From 70492b8674cfe696c22636dca649703264276d2e Mon Sep 17 00:00:00 2001 From: anmol26s Date: Thu, 11 Oct 2018 22:47:16 +0530 Subject: [PATCH 09/18] Updated to version 1.0.0 --- README.md | 2 +- conf/app.src | 2 +- manifest.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4903cbc..544aa27 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** # Nodejs branch for servers giving error on yarn install (OVH) diff --git a/conf/app.src b/conf/app.src index 7c34579..97c6d3c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,4 +1,4 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-rc.2/peertube-v1.0.0-rc.2.tar.xz +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0/peertube-v1.0.0.tar.xz SOURCE_SUM=3222dff35dd6784001732e3599f435fb58a7304acffe12a7c19c59a4ee88bbc0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz 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 5313b0ef04dd2127c29513593e011bcd05cb2afa Mon Sep 17 00:00:00 2001 From: anmol26s Date: Fri, 12 Oct 2018 12:26:25 +0530 Subject: [PATCH 10/18] corrected the sha256sum for the sources --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 97c6d3c..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/peertube-v1.0.0.tar.xz -SOURCE_SUM=3222dff35dd6784001732e3599f435fb58a7304acffe12a7c19c59a4ee88bbc0 +SOURCE_SUM=1d101e96e81dffc0dee10fb07c525881c62f70a1859b5f804450fe68e09cb1a1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true From 231ba35c6a7ef0848cbe0ec98815b1c1e43b3fd8 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Fri, 12 Oct 2018 12:27:49 +0530 Subject: [PATCH 11/18] corrected the sha256sum for the sources --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index e641fc0..97c6d3c 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_SUM=3222dff35dd6784001732e3599f435fb58a7304acffe12a7c19c59a4ee88bbc0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true From 5d3f01f3f3867adae6267054ece85c3368907a98 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Fri, 12 Oct 2018 12:41:28 +0530 Subject: [PATCH 12/18] corrected the sha256sum for the sources --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 97c6d3c..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/peertube-v1.0.0.tar.xz -SOURCE_SUM=3222dff35dd6784001732e3599f435fb58a7304acffe12a7c19c59a4ee88bbc0 +SOURCE_SUM=1d101e96e81dffc0dee10fb07c525881c62f70a1859b5f804450fe68e09cb1a1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true From 35d4924498211070dc191ac00efe3f4cb695c1f3 Mon Sep 17 00:00:00 2001 From: anmol Date: Thu, 25 Oct 2018 22:01:11 +0530 Subject: [PATCH 13/18] 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 544aa27..1c0f652 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** # Nodejs branch for servers giving error on yarn install (OVH) 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 90c1c007b807e5e17bfaffc82017884ef6d559de Mon Sep 17 00:00:00 2001 From: anmol Date: Mon, 19 Nov 2018 16:15:24 +0530 Subject: [PATCH 14/18] Security:Close the port for peertube --- 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 37bccd8..565b343 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 5ad4961..a35ef5e 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 bfd1bfe..dcf1ff3 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 432066e2947c8a1d6d1559e0e4cc5e880069b912 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Tue, 11 Dec 2018 03:26:59 +0530 Subject: [PATCH 15/18] Updated to version 1.1.0 --- README.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 26 ++++++++++++++++++++------ conf/production.yaml | 13 +++++++------ conf/systemd.service | 14 ++++++++++++++ manifest.json | 2 +- 6 files changed, 45 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 1c0f652..07325cf 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** # Nodejs branch for servers giving error on yarn install (OVH) 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..8bd2852 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 @@ -84,4 +98,4 @@ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_pass http://localhost:__PORT__; - } +} diff --git a/conf/production.yaml b/conf/production.yaml index c827ef9..8ce3521 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,12 +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 ############################################################################### # @@ -176,4 +177,4 @@ services: # If true, a video player will be embedded in the Twitter feed on PeerTube video share # If false, we use an image link card that will redirect on your PeerTube instance # Test on https://cards-dev.twitter.com/validator to see if you are whitelisted - whitelisted: false +whitelisted: false 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 8d68924efb24ed729277644b3a9def8d5eb7060d Mon Sep 17 00:00:00 2001 From: anmol26s Date: Sun, 23 Dec 2018 21:37:44 +0530 Subject: [PATCH 16/18] 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 8bd2852..820d4ce 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 01742cef7276bc3e97ff3e272fee2240cbbeb975 Mon Sep 17 00:00:00 2001 From: anmol Date: Wed, 9 Jan 2019 13:13:31 +0530 Subject: [PATCH 17/18] Updated to version 1.1.0 --- conf/nginx.conf | 17 ++--------------- conf/systemd.service | 14 -------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 820d4ce..0817ad8 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,8 @@ 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 c6f0ee17b074fa3768535854813fa8e2cc9cc361 Mon Sep 17 00:00:00 2001 From: anmol Date: Fri, 8 Feb 2019 01:14:08 +0530 Subject: [PATCH 18/18] Updated to version 1.2.0 --- README.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 40 +++++++++++++++++++++++++++++++++++----- conf/production.yaml | 13 ++++++++++++- conf/systemd.service | 19 +++++++++++++++++++ manifest.json | 2 +- 6 files changed, 70 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 07325cf..5ea302b 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** # Nodejs branch for servers giving error on yarn install (OVH) 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 0817ad8..71e59d3 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,4 @@ -# 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"; @@ -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,8 +79,14 @@ 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 /; + } # Websocket tracker @@ -85,4 +100,19 @@ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 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"; + } + + + diff --git a/conf/production.yaml b/conf/production.yaml index 8ce3521..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,10 +180,12 @@ 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 # If true, a video player will be embedded in the Twitter feed on PeerTube video share # If false, we use an image link card that will redirect on your PeerTube instance # Test on https://cards-dev.twitter.com/validator to see if you are whitelisted -whitelisted: false + whitelisted: false 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": {