From 8789a87a7fe83d40227b168f8e9bf596fb5157db Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 5 Jun 2019 02:40:03 +0200 Subject: [PATCH 1/8] Apply ovh_fix --- scripts/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 1ddc5bb..5acbe89 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 @@ -171,7 +171,7 @@ ynh_store_file_checksum --file="$final_path/config/local-production.json" #================================================= pushd "$final_path" - yarn install --production --pure-lockfile + #yarn install --production --pure-lockfile popd #================================================= @@ -211,7 +211,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 @@ -238,7 +238,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 #================================================= From e63f148d9385794be5def96327c4a5daa2495c83 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 6 Jun 2019 00:54:58 +0200 Subject: [PATCH 2/8] fix ovh for upgrade script --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index aef0c55..2be4c8e 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 @@ -182,7 +182,7 @@ ynh_store_file_checksum "$final_path/config/production.yaml" #================================================= pushd "$final_path" - yarn install --production --pure-lockfile + #yarn install --production --pure-lockfile popd #================================================= From cb8a1c90a990ac2c34701b456e7e13c53dbf9335 Mon Sep 17 00:00:00 2001 From: nouts Date: Thu, 6 Jun 2019 21:03:08 +0200 Subject: [PATCH 3/8] update readme with ovh command line --- README.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 71e59fb..801eb06 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. From 645f6136d43e36dea6a1f348738473e3ffe24f61 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 Jun 2019 16:07:16 +0200 Subject: [PATCH 4/8] 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 5/8] 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 6/8] 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 7/8] 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 8/8] 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