diff --git a/scripts/install b/scripts/install index 01fa605..33c4fff 100644 --- a/scripts/install +++ b/scripts/install @@ -98,9 +98,12 @@ ynh_app_setting_set $app port $port ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib +ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn #================================================= # CREATE A POSTGRESQL DATABASE @@ -190,12 +193,6 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.0" --save - #sudo -u $app env PATH=$PATH:$nodejs_path npm install "eslint@>=5.0.0" --save - #sudo -u $app env PATH=$PATH:$nodejs_path npm install - #sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix sudo -u $app env PATH=$PATH:$nodejs_path yarn install sudo -u $app env PATH=$PATH:$nodejs_path npm run build popd diff --git a/scripts/remove b/scripts/remove index 9f2ab84..2b6f6a4 100644 --- a/scripts/remove +++ b/scripts/remove @@ -58,6 +58,8 @@ ynh_remove_app_dependencies ynh_use_nodejs ynh_remove_nodejs +rm -rf "/etc/apt/sources.list.d/yarn.list" + #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index 0d0c4d8..35a175a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -93,9 +93,12 @@ chown -R "$app":"$app" "$final_path" # Define and install dependencies +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib +ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 08b616f..2080e5a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,9 +102,12 @@ ynh_add_nginx_config # UPGRADE DEPENDENCIES #================================================= +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + ynh_install_nodejs 10 -ynh_install_app_dependencies redis-server postgresql postgresql-contrib +ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn #================================================= # CREATE DEDICATED USER