diff --git a/README.md b/README.md index a551c91..96cbfa2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ + + # Mastodon for YunoHost [![Integration level](https://dash.yunohost.org/integration/mastodon.svg)](https://dash.yunohost.org/appci/app/mastodon) ![](https://ci-apps.yunohost.org/ci/badges/mastodon.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mastodon.maintain.svg) @@ -5,13 +10,22 @@ *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install Mastodon quickly and simply on a YunoHost server. +> *This package allows you to install Mastodon quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview + Mastodon is a free, open-source microblogging social network. It is a decentralized alternative to commercial platforms like Twitter and avoids the risks of a single company monopolizing your communication for commercial purposes. -**Shipped version:** 3.4.1 +**Shipped version:** 3.4.4~ynh1 + +**Demo:** https://joinmastodon.org/ + +## Screenshots + +![](./doc/screenshots/mastodon.png) + +## Disclaimers / important information ## Important points to read before installing @@ -20,10 +34,6 @@ Mastodon is a free, open-source microblogging social network. It is a decentrali 1. At the end of the installation a mail is sent to the user with the automatically generated password 1. It seems important to close the inscriptions for your Mastodon, so that it remains a private body. We invite you to block remote malicious instances from the administration interface. You can also add text on your home page. -## Screenshots - -![](https://framalibre.org/sites/default/files/mastodon.png) - ## Configuration ### Install @@ -50,29 +60,19 @@ $ screen -r `$ (cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help)` -## Documentation - - * Official documentation: https://docs.joinmastodon.org/ - ## YunoHost specific features #### Multi-users support LDAP authentication is activated. All YunoHost users can authenticate. -#### Supported architectures +## Documentation and resources -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mastodon.svg)](https://ci-apps.yunohost.org/ci/apps/mastodon/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mastodon.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mastodon/) - -## Links - - * Report a bug: https://github.com/YunoHost-Apps/mastodon_ynh/issues - * App website: https://joinmastodon.org/ - * Upstream app repository: https://github.com/tootsuite/mastodon - * YunoHost website: https://yunohost.org/ - ---- +* Official app website: https://joinmastodon.org/ +* Official admin documentation: https://docs.joinmastodon.org/ +* Upstream app code repository: https://github.com/mastodon/mastodon +* YunoHost documentation for this app: https://yunohost.org/app_mastodon +* Report a bug: https://github.com/YunoHost-Apps/mastodon_ynh/issues ## Developer info @@ -84,3 +84,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh/tree/tes or sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index a26a0ce..7acbe9f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -3,15 +3,26 @@ [![Niveau d'intégration](https://dash.yunohost.org/integration/mastodon.svg)](https://dash.yunohost.org/appci/app/mastodon) ![](https://ci-apps.yunohost.org/ci/badges/mastodon.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mastodon.maintain.svg) [![Installer Mastodon avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mastodon) -*[Read this readme in english.](./README.md)* +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer Mastodon rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* +> *Ce package vous permet d'installer Mastodon rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble + Mastodon est un réseau social de microblog auto-hébergé et open source. C'est une alternative décentralisée aux plates-formes commerciales comme Twitter. Mastodon évite ainsi les risques qu'une seule société monopolise votre communication à des fins commerciales. -**Version incluse:** 3.4.1 + +**Version incluse :** 3.4.4~ynh1 + +**Démo :** https://joinmastodon.org/ + +## Captures d'écran + +![](./doc/screenshots/mastodon.png) + +## Avertissements / informations importantes ## Points importants à lire avant l'installation @@ -61,19 +72,13 @@ L'utilisateur admin est créé automatiquement comme : user@domain.tld L'authentification LDAP est activée. Tous les utilisateurs YunoHost peuvent s'authentifier. -#### Architectures supportées +## Documentations et ressources -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mastodon.svg)](https://ci-apps.yunohost.org/ci/apps/mastodon/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mastodon.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mastodon/) - -## Liens - - * Signaler un bug : https://github.com/YunoHost-Apps/mastodon_ynh/issues - * Site de l'application : https://joinmastodon.org/ - * Dépôt de l'application principale : https://github.com/tootsuite/mastodon - * Site web YunoHost : https://yunohost.org/ - ---- +* Site officiel de l'app : https://joinmastodon.org/ +* Documentation officielle de l'admin : https://docs.joinmastodon.org/ +* Dépôt de code officiel de l'app : https://github.com/mastodon/mastodon +* Documentation YunoHost pour cette app : https://yunohost.org/app_mastodon +* Signaler un bug : https://github.com/YunoHost-Apps/mastodon_ynh/issues ## Informations pour les développeurs @@ -85,3 +90,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh/tree/tes ou sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/testing --debug ``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/check_process b/check_process index 8afe689..0216939 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,9 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - admin="john" (USER) + domain="domain.tld" + admin="john" language="fr_FR" - is_public=1 (PUBLIC|public=1|private=0) + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=0 @@ -12,47 +12,14 @@ setup_private=1 setup_public=1 upgrade=1 - # 3.1.2~ynh2 - #upgrade=1 from_commit=7e1f4c2dee5f2c8374686aea62f4648cdf2722c3 - # 3.1.2~ynh3 - #upgrade=1 from_commit=6b30109fc986d83166b1805ec3ad7e28200e3743 - # 3.1.2~ynh4 - #upgrade=1 from_commit=d3df899e0a99a63ee1cf7ad845cc513aeaaf30ef - # 3.2.0~ynh1 - #upgrade=1 from_commit=bde14cc4496445fdfed4616ac44fc9527c8369fd - # 3.2.1~ynh1 - #upgrade=1 from_commit=248b717f373f3c82bdb19c33cf20980494608697 - # 3.2.1~ynh2 - #upgrade=1 from_commit=74908bf3e70c134bc838c7db3ae8b5aa0938cd75 - # 3.2.2~ynh1 - #upgrade=1 from_commit=a233ccc644d97aa89756fac9f0ce68c98d81d27c - # 3.3.0~ynh1 - #upgrade=1 from_commit=a7eb98db3fac0697b923072dcd78c1ca04bf0a12 # 3.4.1~ynh1 - #upgrade=1 from_commit=efbdbb05350b820c6e59a7bbbf70f57cf679fff8 + upgrade=1 from_commit=efbdbb05350b820c6e59a7bbbf70f57cf679fff8 backup_restore=1 - multi_instance=1 - port_already_use=0 + multi_instance=0 change_url=0 ;;; Options Email=yalh@yahoo.com Notification=all ;;; Upgrade options - ; commit=7e1f4c2dee5f2c8374686aea62f4648cdf2722c3 - name=3.1.2~ynh2 - ; commit=6b30109fc986d83166b1805ec3ad7e28200e3743 - name=3.1.2~ynh3 - ; commit=d3df899e0a99a63ee1cf7ad845cc513aeaaf30ef - name=3.1.2~ynh4 - ; commit=bde14cc4496445fdfed4616ac44fc9527c8369fd - name=3.2.0~ynh1 - ; commit=248b717f373f3c82bdb19c33cf20980494608697 - name=3.2.1~ynh1 - ; commit=74908bf3e70c134bc838c7db3ae8b5aa0938cd75 - name=3.2.1~ynh2 - ; commit=a233ccc644d97aa89756fac9f0ce68c98d81d27c - name=3.2.2~ynh1 - ; commit=a7eb98db3fac0697b923072dcd78c1ca04bf0a12 - name=3.3.0~ynh1 ; commit=efbdbb05350b820c6e59a7bbbf70f57cf679fff8 name=3.4.1~ynh1 diff --git a/conf/app.src b/conf/app.src index dcbcb48..1c9fc19 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,7 +1,6 @@ -SOURCE_URL=https://github.com/tootsuite/mastodon/archive/refs/tags/v3.4.1.tar.gz -SOURCE_SUM=9e449805ea78afa62fee8ab31a427dee57b50cdb391335d4986d10e611103fbd +SOURCE_URL=https://github.com/tootsuite/mastodon/archive/refs/tags/v3.4.4.tar.gz +SOURCE_SUM=567e57cc9d35306cbd708a33bc0bf1adf7981f3706ca4eced0d0c2b4f980034d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= SOURCE_EXTRACT=true diff --git a/conf/cron b/conf/cron index 776808b..710e7f0 100644 --- a/conf/cron +++ b/conf/cron @@ -1,5 +1,5 @@ -@daily cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove -@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove-orphans -@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl accounts cull -@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl statuses remove -@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl preview_cards remove +@daily cd __FINAL_PATH__/live && sudo -u __APP__ __YNH_RUBY_LOAD_PATH__ RAILS_ENV=production bin/tootctl media remove +@monthly cd __FINAL_PATH__/live && sudo -u __APP__ __YNH_RUBY_LOAD_PATH__ RAILS_ENV=production bin/tootctl media remove-orphans +@monthly cd __FINAL_PATH__/live && sudo -u __APP__ __YNH_RUBY_LOAD_PATH__ RAILS_ENV=production bin/tootctl accounts cull +@monthly cd __FINAL_PATH__/live && sudo -u __APP__ __YNH_RUBY_LOAD_PATH__ RAILS_ENV=production bin/tootctl statuses remove +@monthly cd __FINAL_PATH__/live && sudo -u __APP__ __YNH_RUBY_LOAD_PATH__ RAILS_ENV=production bin/tootctl preview_cards remove diff --git a/conf/nginx.conf b/conf/nginx.conf index 866fcc7..19c2c01 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,11 +6,6 @@ root __FINALPATH__/live/public; location / { - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - proxy_set_header Accept-Encoding ""; try_files $uri @proxy; diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..72981f6 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +Mastodon is a free, open-source microblogging social network. It is a decentralized alternative to commercial platforms like Twitter and avoids the risks of a single company monopolizing your communication for commercial purposes. \ No newline at end of file diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..bb225b2 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +Mastodon est un réseau social de microblog auto-hébergé et open source. C'est une alternative décentralisée aux plates-formes commerciales comme Twitter. Mastodon évite ainsi les risques qu'une seule société monopolise votre communication à des fins commerciales. diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..7966fa5 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,38 @@ +## Important points to read before installing + +1. **Mastodon** require a dedicated **root domain**, eg. mastodon.domain.tld +1. The user choosen during the installation is automatically created in Mastodon with admin rights +1. At the end of the installation a mail is sent to the user with the automatically generated password +1. It seems important to close the inscriptions for your Mastodon, so that it remains a private body. We invite you to block remote malicious instances from the administration interface. You can also add text on your home page. + +## Configuration + +### Install + +#### Using *screen* in case of disconnect +``` +$ sudo apt-get install screen +$ screen +$ sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh.git +``` +Recover after disconnect: +``` +$ screen -d +$ screen -r +``` + +### Update + +#### Using *screen* highly recommended + +`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug ` + +### Administrate with tooctl + +`$ (cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help)` + +## YunoHost specific features + +#### Multi-users support + +LDAP authentication is activated. All YunoHost users can authenticate. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..9218cd3 --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,47 @@ +## Points importants à lire avant l'installation + +1. **Mastodon** nécessite un **nom de domaine** dédié, par exemple : mastodon.domain.tld +1. L'utilisateur sélectionné pendant l'installation sera créé automatiquement dans Mastodon avec des droits d'administration. +1. À la fin de l'installation, un mail est envoyé à cet utilisateur avec un mot de passe généré automatiquement. +1. Pour que votre instance Mastodon reste privée, il est important de fermer les inscriptions. Nous vous invitons à bloquer les instances distantes indésirables depuis l'interface d'administration. Vous pouvez également ajouter un texte sur votre page d'accueil dans l'administration. + +## Captures d'écran + +![](https://framalibre.org/sites/default/files/mastodon.png) + +## Configuration + +### Installation + +#### Utilisation de *screen* en cas de déconnection +``` +$ sudo apt-get install screen +$ screen +$ sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh.git +``` +Récupérer l'installation après une deconnection : +``` +$ screen -d +$ screen -r +``` +L'utilisateur admin est créé automatiquement comme : user@domain.tld + +### Mise à jour + +#### Utilisation de *screen* fortement recommandée + +`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug ` + +### Administration avec tooctl + +`$ (cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help)` + +## Documentation + + * Documentation officielle : https://docs.joinmastodon.org/ + +## Caractéristiques spécifiques YunoHost + +#### Support multi-utilisateur + +L'authentification LDAP est activée. Tous les utilisateurs YunoHost peuvent s'authentifier. diff --git a/doc/screenshots/mastodon.png b/doc/screenshots/mastodon.png new file mode 100644 index 0000000..f248fd5 Binary files /dev/null and b/doc/screenshots/mastodon.png differ diff --git a/manifest.json b/manifest.json index d5106e9..80fb313 100644 --- a/manifest.json +++ b/manifest.json @@ -3,11 +3,18 @@ "id": "mastodon", "packaging_format": 1, "description": { - "en": "A libre and federated social network.", - "fr": "Un réseau social libre et fédéré." + "en": "Libre and federated social network", + "fr": "Réseau social libre et fédéré" + }, + "version": "3.4.4~ynh1", + "url": "https://github.com/mastodon/mastodon", + "upstream": { + "license": "AGPL-3.0-or-later", + "website": "https://joinmastodon.org/", + "demo": "https://joinmastodon.org/", + "admindoc": "https://docs.joinmastodon.org/", + "code": "https://github.com/mastodon/mastodon" }, - "version": "3.4.1~ynh4", - "url": "https://github.com/tootsuite/mastodon", "license": "AGPL-3.0-or-later", "maintainer": { "name": "yalh76" @@ -23,7 +30,7 @@ } ], "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -33,13 +40,11 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", diff --git a/scripts/_common.sh b/scripts/_common.sh index b6f4796..c861376 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3|libgdbm6 libgdbm-dev redis-server redis-tools postgresql postgresql-contrib libidn11-dev libicu-dev libjemalloc-dev curl apt-transport-https" +pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3|libgdbm6 libgdbm-dev redis-tools redis-server postgresql postgresql-contrib libidn11-dev libicu-dev libjemalloc-dev curl apt-transport-https" MEMORY_NEEDED="2560" diff --git a/scripts/install b/scripts/install index d4056ef..e6960d1 100644 --- a/scripts/install +++ b/scripts/install @@ -75,8 +75,8 @@ ynh_app_setting_set --app=$app --key=port_stream --value=$port_stream #================================================= ynh_script_progression --message="Installing dependencies..." -ynh_install_app_dependencies $pkg_dependencies -ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" ynh_install_ruby --ruby_version=$RUBY_VERSION @@ -93,13 +93,13 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= ynh_script_progression --message="Creating a PostgreSQL database..." +ynh_psql_test_if_first_run # Create PostgreSQL database db_name=$(ynh_sanitize_dbid --db_name="${app}_production") db_user=$(ynh_sanitize_dbid --db_name=$app) db_pwd=$(ynh_string_random --length=30) ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd -ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_psql_execute_as_root --sql="ALTER USER $db_user CREATEDB;" @@ -207,13 +207,13 @@ pushd "$final_path/live" sudo -u $app $ynh_ruby_load_path bin/bundle config without 'development test' sudo -u $app $ynh_ruby_load_path bin/bundle install -j$(getconf _NPROCESSORS_ONLN) ynh_use_nodejs - sudo -u $app $ynh_node_load_PATH yarn install --pure-lockfile + ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH yarn install --pure-lockfile echo "SAFETY_ASSURED=1">> $config - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails db:setup --quiet - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:precompile --quiet - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=admin > /dev/null - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl accounts modify "$admin" --approve + ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails db:setup --quiet + ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:precompile --quiet + ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt + ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=admin > /dev/null + ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl accounts modify "$admin" --approve popd vapid_private_key=$(grep -oP "VAPID_PRIVATE_KEY=\K.+" "$final_path/live/key.txt") diff --git a/scripts/restore b/scripts/restore index 7a3808b..aacb7f0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -41,10 +41,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -104,8 +101,8 @@ ynh_restore_file --origin_path="/etc/cron.d/$app" #================================================= ynh_script_progression --message="Reinstalling dependencies..." -ynh_install_app_dependencies $pkg_dependencies -ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" ynh_install_ruby --ruby_version=$RUBY_VERSION diff --git a/scripts/upgrade b/scripts/upgrade index 0653f76..a386514 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -269,10 +269,10 @@ pushd "$final_path/live" sudo -u $app $ynh_ruby_load_path bin/bundle install -j$(getconf _NPROCESSORS_ONLN) ynh_use_nodejs sudo -u $app $ynh_node_load_PATH yarn install --pure-lockfile - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:clean - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:precompile - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails db:migrate - sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl cache clear + ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:clean + ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:precompile + ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails db:migrate + ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl cache clear popd #=================================================