From 645f6136d43e36dea6a1f348738473e3ffe24f61 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 Jun 2019 16:07:16 +0200 Subject: [PATCH 01/17] Update README.md --- README.md | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 8d3de65..f6a38f1 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,6 @@ Want to see in action? ## Installation -Following command line examples have been updated for ovh virtual machine, according to indications in [Chocobozzz/PeerTube#830 (comment)](https://github.com/Chocobozzz/PeerTube/issues/830#issuecomment-425942717) - -**If you are NOT hosted on OVH virtual machine or experiencing `gyp ERR! configure error`, please switch back to [master branch](https://github.com/YunoHost-Apps/peertube_ynh)** - - - ### Guidelines 1. Require **dedicated domain** like **peertube.domain.tld**. @@ -54,14 +48,13 @@ Following command line examples have been updated for ovh virtual machine, accor $ 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. **If you are hosted on OVH virtual machine or experiencing `gyp ERR! configure error`, please switch to [ovh_fix](https://github.com/YunoHost-Apps/peertube_ynh/tree_ovh)** ### Installing guide 1. App can be installed by **running following commands**: - $ sudo yunohost app install https://github.com/YunoHost-Apps/peertube_ynh/tree/ovh_fix - $ cd /var/www/peertube && sudo yarn install --production --pure-lockfile - $ sudo systemctl restart peertube + $ 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/production.yml**. @@ -69,9 +62,7 @@ Following command line examples have been updated for ovh virtual machine, accor ### Update Guide 1. App can be updated with the **following commands**: - $ sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/peertube_ynh/tree/ovh_fix peertube - $ cd /var/www/peertube && sudo yarn install --production --pure-lockfile - $ sudo systemctl restart peertube + $ sudo yunohost app upgrade peertube -u https://github.com/YunoHost-Apps/peertube_ynh ### Dependencies * NodeJS, PostgreSQL. From a9b44646b0cd0a9300cc02f259efbdc7bbaf7f46 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 Jun 2019 16:09:48 +0200 Subject: [PATCH 02/17] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f6a38f1..84c1fd2 100644 --- a/README.md +++ b/README.md @@ -52,17 +52,19 @@ Want to see in action? ### Installing guide - 1. App can be installed by **running following commands**: + 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. 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/production.yml**. ### Update Guide - 1. App can be updated with the **following commands**: - + 1. App can be updated by YunoHost **admin web-interface** or with the **following command**: + $ sudo yunohost app upgrade peertube -u https://github.com/YunoHost-Apps/peertube_ynh + ### Dependencies * NodeJS, PostgreSQL. From 97debbcf8b86cd7dc1fc48e644dbfc1a738d56ce Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 Jun 2019 16:11:16 +0200 Subject: [PATCH 03/17] fix install and upgrade --- scripts/install | 4 ++-- scripts/upgrade | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 0d4633e..9a3797f 100644 --- a/scripts/install +++ b/scripts/install @@ -71,7 +71,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port ynh_print_info --message="Installing dependencies..." # Install nodejs -#ynh_install_nodejs --nodejs_version=8 +ynh_install_nodejs --nodejs_version=8 # Install dependencies ynh_install_app_dependencies $pkg_dependencies @@ -179,7 +179,7 @@ ynh_store_file_checksum --file="$final_path/config/local-production.json" chown -R "$app":"$app" $final_path pushd "$final_path" - #sudo -u $app env PATH=$PATH yarn install --production --pure-lockfile + sudo -u $app env PATH=$PATH yarn install --production --pure-lockfile popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6a2c961..d92fc9c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -133,7 +133,7 @@ ynh_add_nginx_config ynh_print_info --message="Upgrading dependencies..." # Install nodejs -#ynh_install_nodejs --nodejs_version=8 +ynh_install_nodejs --nodejs_version=8 # Install dependencies ynh_install_app_dependencies $pkg_dependencies @@ -190,7 +190,7 @@ ynh_replace_string --match_string="X-Frame-Options : SAMEORIGIN" --replace_strin chown -R "$app":"$app" $final_path pushd "$final_path" - #sudo -u $app env PATH=$PATH yarn install --production --pure-lockfile + sudo -u $app env PATH=$PATH yarn install --production --pure-lockfile popd #================================================= From 8c2cd50389ae3f5419f8f81cfbabecc1b8b6e59b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 Jun 2019 16:13:13 +0200 Subject: [PATCH 04/17] fix install and upgrade --- scripts/install | 5 +++-- scripts/upgrade | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 9a3797f..78bb486 100644 --- a/scripts/install +++ b/scripts/install @@ -179,6 +179,7 @@ ynh_store_file_checksum --file="$final_path/config/local-production.json" chown -R "$app":"$app" $final_path pushd "$final_path" + ynh_use_nodejs sudo -u $app env PATH=$PATH yarn install --production --pure-lockfile popd @@ -219,7 +220,7 @@ yunohost service add $app --description "$app daemon for Peertube" --log "/home/ #================================================= ynh_print_info --message="Starting a systemd service..." -#ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server listening on localhost" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server listening on localhost" #================================================= # SETUP SSOWAT @@ -246,7 +247,7 @@ ynh_systemd_action --service_name=nginx --action=reload # we need to wait for the service to init peertube's database pushd "$final_path" - #echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production npm run reset-password -- -u root + echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production npm run reset-password -- -u root popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d92fc9c..a2d4d91 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -190,6 +190,7 @@ ynh_replace_string --match_string="X-Frame-Options : SAMEORIGIN" --replace_strin chown -R "$app":"$app" $final_path pushd "$final_path" + ynh_use_nodejs sudo -u $app env PATH=$PATH yarn install --production --pure-lockfile popd From 6c181fdb2375a1220484f6dc8505336444f859f8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 Jun 2019 16:14:06 +0200 Subject: [PATCH 05/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 84c1fd2..3b63b5c 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Want to see in action? $ 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. **If you are hosted on OVH virtual machine or experiencing `gyp ERR! configure error`, please switch to [ovh_fix](https://github.com/YunoHost-Apps/peertube_ynh/tree_ovh)** + 1. **If you are hosted on OVH virtual machine or experiencing `gyp ERR! configure error`, please switch to [ovh_fix](https://github.com/YunoHost-Apps/peertube_ynh/tree/ovh_fix)** ### Installing guide From b894bf34684e1053cb78207ff17d62f6c885b832 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 13 Jul 2019 15:29:33 +0200 Subject: [PATCH 06/17] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 3b63b5c..c0f6c6d 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,6 @@ Want to see in action? Developers info ---------------- -**Only if you want to use a testing branch for coding, instead of merging directly into master.** Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/peertube_ynh/tree/testing). To try the testing branch, please proceed like that. From c9338a22289745adf0012a659837ec78e63c1fe3 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 14 Jul 2019 18:42:44 +0200 Subject: [PATCH 07/17] Update README.md --- README.md | 52 ++++++++++++++++------------------------------------ 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index c0f6c6d..b5e8d7c 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,22 @@ By watching a video, you help the hosting provider to broadcast it by becoming a **Shipped version:** 1.3.1 +## Important points to read before installing + +1. Require **dedicated domain** like **peertube.domain.tld**. +1. **No LDAP** support (blocked until PeerTube core upstream implements it) +1. Admin username is : **root**. +1. **Admin password** will be sent to the email address given at the time of the installation. +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. **If you are hosted on OVH virtual machine or experiencing `gyp ERR! configure error`, please switch to [ovh_fix](https://github.com/YunoHost-Apps/peertube_ynh/tree/ovh_fix)** + ## Screenshots ![](https://framablog.org/wp-content/uploads/2018/03/Framatube-au-lancement.png) @@ -34,42 +50,6 @@ Want to see in action? * [Here](http://peertube.cpy.re) are the list of instances ran by people around the world. Be a part of it. -## Installation - -### Guidelines - - 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. **If you are hosted on OVH virtual machine or experiencing `gyp ERR! configure error`, please switch to [ovh_fix](https://github.com/YunoHost-Apps/peertube_ynh/tree/ovh_fix)** - -### Installing guide - - 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. 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/production.yml**. - - ### Update Guide - 1. App can be updated by YunoHost **admin web-interface** or with the **following command**: - - $ sudo yunohost app upgrade peertube -u https://github.com/YunoHost-Apps/peertube_ynh - -### Dependencies - - * NodeJS, PostgreSQL. - * On Debian Jessie,backport is added for the ffmpeg package. - ## Documentation * Official documentation: https://docs.joinpeertube.org/ From 33620aacc6f6e2ac003ae6bd2de57dc5d74a5343 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 11 Oct 2019 23:20:15 +0200 Subject: [PATCH 08/17] Upgrade to 1.4.1 --- README.md | 2 +- conf/app.src | 4 +- conf/production.yaml | 112 +++++++++++++++++++++++++++++++++++++++---- manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/install | 6 +-- scripts/restore | 2 +- scripts/upgrade | 3 +- 8 files changed, 113 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index b5e8d7c..3fbbf95 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Servers are run independently by different people and organizations. They can ap By watching a video, you help the hosting provider to broadcast it by becoming a broadcaster of the video yourself. Each instance doesn’t need much money to broadcast the videos of its users. -**Shipped version:** 1.3.1 +**Shipped version:** 1.4.1 ## Important points to read before installing diff --git a/conf/app.src b/conf/app.src index b68a873..e553737 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.3.1/peertube-v1.3.1.tar.xz -SOURCE_SUM=57737960c07122207f0126488750d675c64403f325aea5f094408e0140e2061c +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.4.1/peertube-v1.4.1.tar.xz +SOURCE_SUM=49da83b9143ac4a6a486eff7b726830923022a97c6a692722bda20044fe6cd70 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/conf/production.yaml b/conf/production.yaml index d41be8c..b86bcb4 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -9,10 +9,18 @@ webserver: port: 443 rates_limit: + api: + # 50 attempts in 10 seconds + window: 10 seconds + max: 50 login: # 15 attempts in 5 min window: 5 minutes max: 15 + signup: + # 2 attempts in 5 min (only succeeded attempts are taken into account) + window: 5 minutes + max: 2 ask_send_email: # 3 attempts in 5 min window: 5 minutes @@ -53,10 +61,16 @@ smtp: disable_starttls: true ca_file: null # Used for self signed certificates from_address: 'webmaster@__domain__' + +email: + body: + signature: "PeerTube" + subject: + prefix: "[PeerTube]" # From the project root directory storage: - tmp: '/home/yunohost.app/__app__/storage/tmp/' # Used to download data (imports etc), store uploaded files before processing... + tmp: '/home/yunohost.app/__app__/storage/tmp/' # Use to download data (imports etc), store uploaded files before processing... avatars: '/home/yunohost.app/__app__/storage/avatars/' videos: '/home/yunohost.app/__app__/storage/videos/' streaming_playlists: '/home/yunohost.app/__app__/storage/streaming-playlists/' @@ -67,9 +81,12 @@ storage: torrents: '/home/yunohost.app/__app__/storage/torrents/' captions: '/home/yunohost.app/__app__/storage/captions/' cache: '/home/yunohost.app/__app__/storage/cache/' + plugins: '/home/yunohost.app/__app__/storage/plugins/' log: level: 'info' # debug/info/warning/error + rotation: + enabled : true # Enabled by default, if disabled make sure that 'storage.logs' is pointing to a folder handled by logrotate search: # Add ability to fetch remote videos/actors by their URI, that may not be federated with your instance @@ -88,8 +105,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: + check_interval: '1 hour' # How often you want to check new videos to cache + strategies: # Just uncomment strategies you want # - # size: '10GB' # # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances) @@ -139,6 +156,14 @@ views: remote: max_age: -1 +plugins: + # The website PeerTube will ask for available PeerTube plugins and themes + # This is an unmoderated plugin index, so only install plugins/themes you trust + index: + enabled: true + check_latest_versions_interval: '12 hours' # How often you want to check new plugins/themes versions + url: 'https://packages.joinpeertube.org' + ############################################################################### # @@ -197,6 +222,7 @@ transcoding: 480p: false 720p: false 1080p: false + 2160p: false # /!\ EXPERIMENTAL /!\ # /!\ Requires ffmpeg >= 4 # Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent: @@ -225,9 +251,62 @@ auto_blacklist: instance: name: 'YunoHost PeerTube' short_description: 'PeerTube, a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.' - description: '' # Support markdown - terms: '' # Support markdown + description: 'Welcome to this PeerTube instance!' # Support markdown + terms: 'No terms for now.' # Support markdown + code_of_conduct: '' # Supports markdown + + # Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc + moderation_information: '' # Supports markdown + + # Why did you create this instance? + creation_reason: '' + + # Who is behind the instance? A single person? A non profit? + administrator: '' + + # How long do you plan to maintain this instance? + maintenance_lifetime: '' + + # How will you pay the PeerTube instance server? With you own funds? With users donations? Advertising? + business_model: '' + + # If you want to explain on what type of hardware your PeerTube instance runs + # Example: "2 vCore, 2GB RAM..." + hardware_information: '' # Supports Markdown + + # What are the main languages of your instance? To interact with your users for example + # Uncomment or add the languages you want + # List of supported languages: https://peertube.cpy.re/api/v1/videos/languages + languages: +# - en +# - es +# - fr + + # You can specify the main categories of your instance (dedicated to music, gaming or politics etc) + # Uncomment or add the category ids you want + # List of supported categories: https://peertube.cpy.re/api/v1/videos/categories + categories: +# - 1 # Music +# - 2 # Films +# - 3 # Vehicles +# - 4 # Art +# - 5 # Sports +# - 6 # Travels +# - 7 # Gaming +# - 8 # People +# - 9 # Comedy +# - 10 # Entertainment +# - 11 # News & Politics +# - 12 # How To +# - 13 # Education +# - 14 # Activism +# - 15 # Science & Technology +# - 16 # Animals +# - 17 # Kids +# - 18 # Food + default_client_route: '/videos/trending' + # Whether or not the instance is dedicated to NSFW content # Enabling it will allow other administrators to know that you are mainly federating sensitive content # Moreover, the NSFW checkbox on video upload will be automatically checked by default @@ -235,6 +314,7 @@ instance: # By default, "do_not_list" or "blur" or "display" NSFW videos # Could be overridden per user with a setting default_nsfw_policy: 'do_not_list' + customizations: javascript: '' # Directly your JavaScript code (without