1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/peertube_ynh.git synced 2024-09-03 19:56:29 +02:00

Merge branch 'ovh_fix_testing' into testing

This commit is contained in:
yalh76 2019-12-27 19:19:27 +01:00 committed by GitHub
commit f0de27ad04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 79 additions and 80 deletions

147
README.md
View file

@ -1,84 +1,77 @@
# PeerTube app for YunoHost
# ovh_fix branch for peertube_ynh
[![Integration level](https://dash.yunohost.org/integration/peertube.svg)](https://dash.yunohost.org/appci/app/peertube)
[![Install PeerTube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube)
If installing on an ovh virtual machine or having `gyp ERR! configure error` please follow the steps below
## Overview
## Steps for installing
### What is PeerTube ?
PeerTube is a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser, using <a href="https://github.com/feross/webtorrent">WebTorrent</a>.
### Why PeerTube ?
1. Install nodejs
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.
So we need to have a decentralized network of servers seeding videos (as [Hubzilla YunoHost](https://github.com/YunoHost-Apps/hubzilla_ynh), [Friendica YunoHost](https://github.com/YunoHost-Apps/friendica_ynh),[Mastodon YunoHost](https://github.com/YunoHost-Apps/mastodon_ynh)), [Diaspora](https://github.com/diaspora/diaspora) ([Diaspora YunoHost](https://github.com/YunoHost-Apps/diaspora_ynh)),[Funkwhale](https://funkwhale.audio) ([Funkwhale YunoHost](https://github.com/YunoHost-Apps/funkwhale_ynh))).
But it's not enough because one video could become famous and overload the server.
It's the reason why we need to use a P2P protocol to limit the server load.
Thanks to [WebTorrent](https://github.com/feross/webtorrent), we can make P2P (thus BitTorrent) inside the web browser, as of today.
### Why is that cool ?
Servers are run independently by different people and organizations. They can apply wildly different moderation policies, so you can find or make one that fits your taste perfectly.
By watching a video, you help the hosting provider to broadcast it by becoming a broadcaster of the video yourself. Each instance doesnt need much money to broadcast the videos of its users.
**Shipped version:** 2.0.0
## 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)
## Demo
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.
## Documentation
* Official documentation: https://docs.joinpeertube.org/
## YunoHost specific features
#### Supported architectures
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/peertube%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/peertube/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/peertube%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/peertube/)
* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/peertube%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/peertube/)
## Links
* Report a bug: https://github.com/YunoHost-Apps/peertube_ynh/issues
* App website: https://joinpeertube.org/fr/
* GitHub App website: https://github.com/Chocobozzz/PeerTube/
* YunoHost website: https://yunohost.org/
---
Developers info
----------------
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.
```
sudo yunohost app install https://github.com/YunoHost-Apps/peertube_ynh/tree/testing --debug
or
sudo yunohost app upgrade peertube -u https://github.com/YunoHost-Apps/peertube_ynh/tree/testing --debug
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
$ sudo apt-get install -y nodejs
```
2. Install the peertube with **OVH fix** branch.
```
$ yunohost app install https://github.com/YunoHost-Apps/peertube_ynh/tree/ovh_fix --debug
```
3. After installation is complete run **yarn install**.
```
$ cd /var/www/peertube && yarn install --production --pure-lockfile
```
4. Give proper **permissions** to peertube
```
$ chown -R peertube:peertube /var/www/peertube
```
5. **Restart peertube** and check if there is any error message.
```
$ service peertube restart
$ journalctl -feu peertube
```
6. If there is no **error in red** in the last lines of log. Press **ctrl+c** to stop the logs.
7. Go to your **domain** to check if peertube is running and everthing is ok.
8. Change your **root password** by this command:
```
$ 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**
## Steps for upgrading
1. Upgrade peertube with **OVH fix** branch.
```
$ yunohost app upgrade peertube -u https://github.com/YunoHost-Apps/peertube_ynh/tree/ovh_fix --debug
```
2. After upgrade is complete run **yarn install**.
```
$ cd /var/www/peertube && yarn install --production --pure-lockfile
```
3. Give proper **permissions** to peertube
```
$ chown -R peertube:peertube /var/www/peertube
```
4. **Restart peertube** and check if there is any error message.
```
$ service peertube restart
```

View file

@ -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=10
#ynh_install_nodejs --nodejs_version=10
# Install dependencies
ynh_install_app_dependencies $pkg_dependencies

View file

@ -121,6 +121,13 @@ then
cp ../conf/local-production.json "$final_path/config/local-production.json"
fi
if [ -s "$tmpdir/local-production.json" ]
then
cp -a "$tmpdir/local-production.json" "$final_path/config/local-production.json"
else
cp ../conf/local-production.json "$final_path/config/local-production.json"
fi
# Remove the tmp directory securely
ynh_secure_remove --file="$tmpdir"
fi
@ -139,8 +146,7 @@ ynh_add_nginx_config
ynh_print_info --message="Upgrading dependencies..."
# Install nodejs
ynh_remove_nodejs --nodejs_version=8
ynh_install_nodejs --nodejs_version=10
#ynh_install_nodejs --nodejs_version=10
# Install dependencies
ynh_install_app_dependencies $pkg_dependencies