diff --git a/README.md b/README.md index 472bf77..8d3de65 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/scripts/install b/scripts/install index 78bb486..0d4633e 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,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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a2d4d91..6a2c961 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,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 #=================================================