mirror of
https://github.com/YunoHost-Apps/peertube_ynh.git
synced 2024-09-03 19:56:29 +02:00
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
This commit is contained in:
parent
f5101da647
commit
1bab3c1248
10 changed files with 63 additions and 37 deletions
22
README.md
22
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)<br><br>
|
||||
=======
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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: []
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue