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' into testing

This commit is contained in:
yalh76 2019-06-22 10:26:34 +02:00 committed by GitHub
commit 720b4d2c97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 15 deletions

View file

@ -36,6 +36,12 @@ 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**.
@ -48,22 +54,24 @@ 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 installing on an ovh virtual machine or having `gyp ERR! configure error` please follow the steps indicated in [Chocobozzz/PeerTube#830 (comment)](https://github.com/Chocobozzz/PeerTube/issues/830#issuecomment-425942717)
### Installing guide
1. App can be installed by YunoHost **admin web-interface** or by **running following command**:
1. App can be installed by **running following commands**:
$ sudo yunohost app install https://github.com/YunoHost-Apps/peertube_ynh
$ 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
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**:
1. App can be updated with the **following commands**:
$ sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/peertube_ynh peertube
$ 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
### Dependencies
* NodeJS, PostgreSQL.

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=8
#ynh_install_nodejs --nodejs_version=8
# Install dependencies
ynh_install_app_dependencies $pkg_dependencies
@ -179,8 +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
#sudo -u $app env PATH=$PATH yarn install --production --pure-lockfile
popd
#=================================================
@ -220,7 +219,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
@ -247,7 +246,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
#=================================================

View file

@ -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,8 +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
#sudo -u $app env PATH=$PATH yarn install --production --pure-lockfile
popd
#=================================================