From 80f55d4febb7a3f6a210676946da6ec6f7d86cf1 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sun, 28 May 2023 18:43:16 +0200 Subject: [PATCH 01/22] Implement postgresql database choice --- manifest.toml | 16 +++++++++------- scripts/backup | 11 ++++++++--- scripts/install | 12 ++++++++---- scripts/remove | 10 +++++++--- scripts/restore | 14 ++++++++++---- scripts/upgrade | 12 ++++++++++++ tests.toml | 16 +++++++++++++++- 7 files changed, 69 insertions(+), 22 deletions(-) diff --git a/manifest.toml b/manifest.toml index e0085f2..22ccc6e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -52,11 +52,12 @@ ram.runtime = "50M" choices = ["none", "7.4", "8.0", "8.1", "8.2"] default = "8.0" - [install.with_mysql] - ask.en = "Do you need a MySQL database?" - ask.fr = "Avez-vous besoin d'une base de données MySQL ?" - type = "boolean" - default = false + [install.database] + ask.en = "Do you need a database?" + ask.fr = "Avez-vous besoin d'une base de données ?" + type = "select" + choices = [ "none", "mysql, 'posrgresql" ] + default = "none" [resources] [resources.system_user] @@ -69,9 +70,10 @@ ram.runtime = "50M" [resources.apt] packages = "nginx" # Kind of "dummy" value to be sure to have a non-empty dep list packages_from_raw_bash = """ - if [[ "$with_mysql" = 1 ]] - then + if [[ "$database" == "mysql" ]]; then echo "mariadb-server" + elif [[ "$database" == "postgresql" ]]; then + echo "postgresql postgresql-contrib" fi if [[ "$phpversion" != none ]] diff --git a/scripts/backup b/scripts/backup index 17b1472..589c16b 100644 --- a/scripts/backup +++ b/scripts/backup @@ -40,10 +40,15 @@ fi # BACKUP THE MYSQL DATABASE #================================================= -if [ $with_mysql -eq 1 ] +if [ $database != "none" ] then - ynh_print_info --message="Backing up the MySQL database..." - ynh_mysql_dump_db --database="$db_name" > db.sql + ynh_print_info --message="Backing up the database..." + + if [ $database == "mysql" ]; then + ynh_mysql_dump_db --database="$db_name" > db.sql* + elif [ $database == "postgresql" ] + ynh_psql_dump_db --database="$db_name" > db.sql + fi fi #================================================= diff --git a/scripts/install b/scripts/install index a976713..f695b9d 100644 --- a/scripts/install +++ b/scripts/install @@ -35,9 +35,8 @@ ynh_app_setting_set --app=$app --key=password --value=$password # CREATE A MYSQL DATABASE #================================================= -if [ $with_mysql -eq 1 ] -then - ynh_script_progression --message="Creating a MySQL database..." --weight=2 +if [ $database != "none" ]; then + ynh_script_progression --message="Creating a database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) db_user=$db_name @@ -45,7 +44,12 @@ then ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_user --value=$db_user ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd - ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name + + if [ $database == "mysql" ]; then + ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name + elif [ $database == "postgresql" ]; then + ynh_psql_setup_db --db_user=$db_user --db_name=$db_name + fi fi #================================================= diff --git a/scripts/remove b/scripts/remove index f86af18..f14eaee 100644 --- a/scripts/remove +++ b/scripts/remove @@ -15,14 +15,18 @@ source /usr/share/yunohost/helpers # REMOVE THE MYSQL DATABASE #================================================= -if [ $with_mysql -eq 1 ]; then - ynh_script_progression --message="Removing the MySQL database..." --weight=2 +if [ $database != "none" ]; then + ynh_script_progression --message="Removing the database..." --weight=2 db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name # Remove a database if it exists, along with the associated user - ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name + if [ $database == "mysql" ]; then + ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name + elif [ $database == "postgresql" ]; then + ynh_psql_remove_db --db_user=$db_user --db_name=$db_name + fi fi #================================================= diff --git a/scripts/restore b/scripts/restore index 8db3265..cd4f1af 100644 --- a/scripts/restore +++ b/scripts/restore @@ -20,14 +20,20 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.d/" # RESTORE THE MYSQL DATABASE #================================================= -if [ $with_mysql -eq 1 ]; then - ynh_script_progression --message="Restoring the MySQL database..." +if [ $database != "none" ]; then + ynh_script_progression --message="Restoring the database..." db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) - ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd - ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql + + if [ $database == "mysql" ]; then + ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd + ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql + elif [ $database == "postgresql" ]; then + ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd + ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql + fi fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 19a6549..49705ae 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,18 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." +# If database doesn't exist, create it and remove with_mysql setting +if [ -z "$(database:-)" ]; then + if [ $with_mysql -eq 1 ]; then + $database="mysql" + else + $database="none" + fi + + ynh_app_setting_set --app=$app --key=database --value=$database + ynh_app_setting_delete --app=$app --key=with_mysql +fi + # If admin_mail_html doesn't exist, create it if [ -z "${admin_mail_html:-}" ]; then admin_mail_html=1 diff --git a/tests.toml b/tests.toml index ce3886c..8cedce2 100644 --- a/tests.toml +++ b/tests.toml @@ -7,8 +7,10 @@ test_format = 1.0 # ------------------------------- args.with_sftp = "1" - args.with_mysql = "1" + args.database = "none" args.phpversion = "8.0" + test_upgrade_from.bf5d3ed.name = "Upgrade from 1.0~ynh14" + test_upgrade_from.bf5d3ed.args.with_mysql = "0" [80_test] @@ -19,3 +21,15 @@ test_format = 1.0 only = ["install.subdir", "backup_restore", "upgrade" ] args.phpversion = "none" + +[mysql_test] + + only = ["install.subdir", "backup_restore", "upgrade", "upgrade.bf5d3ed" ] + args.database = "mysql" + test_upgrade_from.bf5d3ed.name = "Upgrade from 1.0~ynh14" + test_upgrade_from.bf5d3ed.args.with_mysql = "1" + +[postgresql_test] + + only = ["install.subdir", "backup_restore", "upgrade" ] + args.database = "postgresql" From 0f78b7f4b19e9b656e1a769668815f9935cd0cd5 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sun, 28 May 2023 19:02:02 +0200 Subject: [PATCH 02/22] oops --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index 589c16b..4e0ff8c 100644 --- a/scripts/backup +++ b/scripts/backup @@ -46,7 +46,7 @@ then if [ $database == "mysql" ]; then ynh_mysql_dump_db --database="$db_name" > db.sql* - elif [ $database == "postgresql" ] + elif [ $database == "postgresql" ]; then ynh_psql_dump_db --database="$db_name" > db.sql fi fi From 8cff6952cbcb5660e044c51637de525eb376bcbd Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sun, 28 May 2023 19:29:25 +0200 Subject: [PATCH 03/22] =?UTF-8?q?opps=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 49705ae..5593d78 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,7 @@ upgrade_type=$(ynh_check_app_version_changed) ynh_script_progression --message="Ensuring downward compatibility..." # If database doesn't exist, create it and remove with_mysql setting -if [ -z "$(database:-)" ]; then +if [ -z "${database:-}" ]; then if [ $with_mysql -eq 1 ]; then $database="mysql" else From 8657238c524cb5228d5e446b54a7266236f6a486 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sun, 28 May 2023 20:04:50 +0200 Subject: [PATCH 04/22] =?UTF-8?q?oops=C2=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.toml | 2 +- scripts/upgrade | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 22ccc6e..645df79 100644 --- a/manifest.toml +++ b/manifest.toml @@ -56,7 +56,7 @@ ram.runtime = "50M" ask.en = "Do you need a database?" ask.fr = "Avez-vous besoin d'une base de données ?" type = "select" - choices = [ "none", "mysql, 'posrgresql" ] + choices = [ "none", "mysql, 'postgresql" ] default = "none" [resources] diff --git a/scripts/upgrade b/scripts/upgrade index 5593d78..655f49e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,11 +21,11 @@ upgrade_type=$(ynh_check_app_version_changed) ynh_script_progression --message="Ensuring downward compatibility..." # If database doesn't exist, create it and remove with_mysql setting -if [ -z "${database:-}" ]; then +if [ -z "$database" ]; then if [ $with_mysql -eq 1 ]; then - $database="mysql" + database="mysql" else - $database="none" + database="none" fi ynh_app_setting_set --app=$app --key=database --value=$database From 810c3facfa3c9a2c7d3f2a1425d117d9e00fdbf3 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sun, 28 May 2023 21:01:51 +0200 Subject: [PATCH 05/22] i really can't type /o\ --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 645df79..d422410 100644 --- a/manifest.toml +++ b/manifest.toml @@ -56,7 +56,7 @@ ram.runtime = "50M" ask.en = "Do you need a database?" ask.fr = "Avez-vous besoin d'une base de données ?" type = "select" - choices = [ "none", "mysql, 'postgresql" ] + choices = [ "none", "mysql", "postgresql" ] default = "none" [resources] From b5f4e50ff98934cd9f0628fdc0b6a704a529f52e Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sun, 28 May 2023 22:16:28 +0200 Subject: [PATCH 06/22] fix database: unbound variable --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 655f49e..ef64b1e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,7 @@ upgrade_type=$(ynh_check_app_version_changed) ynh_script_progression --message="Ensuring downward compatibility..." # If database doesn't exist, create it and remove with_mysql setting -if [ -z "$database" ]; then +if [ -z "${database:-}" ]; then if [ $with_mysql -eq 1 ]; then database="mysql" else From 1d83be3e56aba29087fe04de391183f7be7c6b8b Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sat, 10 Jun 2023 22:38:37 +0200 Subject: [PATCH 07/22] Update manifest.toml --- manifest.toml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index d422410..d29dbf6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -72,12 +72,19 @@ ram.runtime = "50M" packages_from_raw_bash = """ if [[ "$database" == "mysql" ]]; then echo "mariadb-server" - elif [[ "$database" == "postgresql" ]]; then + + if [[ "$phpversion" != none ]]; then + echo "php${phpversion}-mysql" + fi + elif [[ "$database" == "postgresql" ]]; then echo "postgresql postgresql-contrib" + + if [[ "$phpversion" != none ]]; then + echo "php${phpversion}-pgsql" + fi fi - if [[ "$phpversion" != none ]] - then - echo "php${phpversion}-fpm php${phpversion}-mysql" + if [[ "$phpversion" != none ]]; then + echo "php${phpversion}-fpm" fi """ From 494db3a91eec6864bf9d14739286ee5b5a7909cc Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 16 Aug 2023 16:17:10 +0200 Subject: [PATCH 08/22] Actually use the generated db_pwd --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index a976713..d9a48cf 100644 --- a/scripts/install +++ b/scripts/install @@ -45,7 +45,7 @@ then ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_user --value=$db_user ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd - ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name + ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd fi #================================================= From 347546ab04f9a4b03bda4f9665a877117a4d0837 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 16 Aug 2023 16:25:01 +0200 Subject: [PATCH 09/22] Bump package version and display bugfix --- doc/PRE_UPGRADE.d/1.0~ynh15.md | 4 ++++ manifest.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 doc/PRE_UPGRADE.d/1.0~ynh15.md diff --git a/doc/PRE_UPGRADE.d/1.0~ynh15.md b/doc/PRE_UPGRADE.d/1.0~ynh15.md new file mode 100644 index 0000000..d2c841d --- /dev/null +++ b/doc/PRE_UPGRADE.d/1.0~ynh15.md @@ -0,0 +1,4 @@ +If you experienced issues with the displayed database password before, sorry for the inconvenience! + +- New installations of the app fix the bug. +- If you want to keep using your current instance, you can use PhpMyAdmin to change the __APP__ user's password. diff --git a/manifest.toml b/manifest.toml index e0085f2..f17289e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "My Webapp" description.en = "Custom Web app with SFTP access to serve static (HTML, CSS, JS) and PHP files" description.fr = "Application Web personnalisée avec accès SFTP pour servir des fichiers statiques (HTML, CSS, JS) et PHP" -version = "1.0~ynh14" +version = "1.0~ynh15" maintainers = [] From 043c417a4504a9d45bc8b059bb40f098109d8c76 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 16 Aug 2023 14:25:34 +0000 Subject: [PATCH 10/22] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a955187..b48addc 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2` **Once installed, go to the chosen URL to know the user, domain and port you will have to use for the SFTP access.** The password is one you chosen during the installation. Under the Web directory, you will see a `www` folder which contains the public files served by this app. You can put all the files of your custom Web application inside. -**Shipped version:** 1.0~ynh14 +**Shipped version:** 1.0~ynh15 ## Documentation and resources * Upstream app code repository: diff --git a/README_fr.md b/README_fr.md index b99c86e..d81d0bb 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ La version de PHP-FPM peut aussi être choisie, parmi `none`, `7.4`, `8.0`, `8.1 **Une fois installé, rendez-vous sur l'URL choisie pour connaître l'utilisateur, le domaine et le port que vous devrez utiliser pour l'accès SFTP.** Le mot de passe est celui que vous avez choisi lors de l'installation. Sous le répertoire Web, vous verrez un dossier `www` qui contient les fichiers publics servis par cette application. Vous pouvez mettre tous les fichiers de votre application Web personnalisée à l'intérieur. -**Version incluse :** 1.0~ynh14 +**Version incluse :** 1.0~ynh15 ## Documentations et ressources * Dépôt de code officiel de l’app : From e3599fe60c2ae982f8cc9539bb9063ed45e73770 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 16 Aug 2023 17:37:36 +0200 Subject: [PATCH 11/22] Improve POST_INSTALL documentation for databases --- doc/POST_INSTALL.md | 3 ++- doc/POST_INSTALL_fr.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index c463db3..a961614 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,5 +1,6 @@ -If you have requested a MYSQL database, please find information about this SQL database: +If you have requested a database, here are information to log into it: +- Type: __DATABASE__ - Database user: __DB_USER__ - Database name: __DB_NAME__ - Password: __DB_PWD__ diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md index 87467a7..bb975e7 100644 --- a/doc/POST_INSTALL_fr.md +++ b/doc/POST_INSTALL_fr.md @@ -1,5 +1,6 @@ -Si vous avez demandé une base de données MYSQL, voici les informations de cette base de données SQL : +Si vous avez demandé une base de données, voici les informations pour s'y connecter : +- Type : __DATABASE__ - Utilisateur de la base de données : __DB_USER__ - Nom de la base de données : __DB_NAME__ - Mot de passe : __DB_PWD__ From ce931807718db9b4e5679185bb04b55344286cea Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 16 Aug 2023 17:52:17 +0200 Subject: [PATCH 12/22] Fix phpversion question type --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 3ea8f7e..38c9f51 100644 --- a/manifest.toml +++ b/manifest.toml @@ -48,7 +48,7 @@ ram.runtime = "50M" [install.phpversion] ask.en = "Choose a PHP version you want to use for your app" ask.fr = "Choisissez une version PHP que vous souhaitez utiliser pour votre application" - type = "string" + type = "select" choices = ["none", "7.4", "8.0", "8.1", "8.2"] default = "8.0" From 7a2eba44db560235b91a800d898bb6cabe47c817 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 16 Aug 2023 18:06:32 +0200 Subject: [PATCH 13/22] Enhance login documentation --- doc/ADMIN.md | 17 ++++++++++++----- doc/ADMIN_fr.md | 21 ++++++++++++--------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 6269999..454a9bb 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -11,13 +11,20 @@ Once installed, go to the chosen URL to know the username, domain and port you w To connect, you'll need an SFTP app such as [Filezilla](https://filezilla-project.org/) for Windows, Mac or Linux. You can also use your default file manager on [Mac](https://support.apple.com/guide/mac-help/connect-mac-shared-computers-servers-mchlp1140/mac) or Linux. -### Adding or editing files - -Once logged in SFTP, under the Web directory, you will see a `www` folder which contains the public files served by this app. You can put all the files of your custom Web application inside. - -### Forgot your SFTP password? +#### Forgot your SFTP password? If you forgot your SFTP password, you can change it in YunoHost's webadmin interface in `Apps > My webapp > My Webapp configuration`. +You can also check there that SFTP is enabled. + +### Login using the command line + +Starting YunoHost v11.1.21, you can run `sudo yunohost app shell __APP__` in the command line interface to log in as your app user. + +The `php` command will point to the PHP version installed for the app. + +### Adding or editing files + +Once logged in, under the Web directory you will see a `www` folder which contains the public files served by this app. You can put all the files of your custom Web application inside. ### Customizing the nginx configuration diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 562ba76..7822a12 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -9,20 +9,23 @@ Une fois installée, rendez-vous sur l'URL choisie pour connaître le nom d'util - Mot de passe: mot de passe défini lors de l'installation - Port: 22 (à moins que vous ayez changé le port SSH) -Pour vous connectez, vous devrez utiliser une application SFTP tel que [Filezilla](https://filezilla-project.org/) pour Windows, Mac ou Linux. Vous pouvez aussi directement utiliser votre gestionnaire de fichiers sous Linux ou [Mac](https://support.apple.com/guide/mac-help/connect-mac-shared-computers-servers-mchlp1140/mac). +Pour vous connecter, vous devrez utiliser une application SFTP tel que [Filezilla](https://filezilla-project.org/) pour Windows, Mac ou Linux. Vous pouvez aussi directement utiliser votre gestionnaire de fichiers sous Linux ou [Mac](https://support.apple.com/guide/mac-help/connect-mac-shared-computers-servers-mchlp1140/mac). + +#### Oubli du mot de passe SFTP + +Si vous avez oublié votre mot de passe SFTP, vous pouvez le changer dans la webadmin de Yunohost dans `Applications > Votre webapp > My Webapp configuration`. +Vous pourrez aussi vérifier que SFTP est activé pour votre app. + +### Connexion par le terminal + +A partir de YunoHost v11.1.21, vous pouvez lancer `sudo yunohost app shell __APP__` dans un terminal pour vous connecter en tant que l'utilisateur gérant l'app. + +La commande `php` pointera vers la version de PHP installée pour l'app. ### Ajouter ou modifier les fichiers Après vous être connecté avec SFTP, sous le répertoire Web, vous verrez un dossier `www` qui contient les fichiers publics servis par cette application. Vous pouvez mettre tous les fichiers de votre application Web personnalisée à l'intérieur. -### Oubli du mot de passe SFTP - -Si vous avez oublié votre mot de passe SFTP, vous pouvez le changer dans la webadmin de Yunohost dans `Applications > Votre webapp > My Webapp configuration`. - -## Résolution de problèmes - -Si vous n'arrivez pas à vous connecter et que vous avez vérifié que le nom d'utilisateur et le mot de passe sont bons, vérifiez si SFTP est activé pour votre app - ### Personnaliser la configuration nginx Si vous souhaitez ajuster la configuration nginx pour cette app, il est recommandé d'éditer `/etc/nginx/conf.d/__DOMAIN__.d/__ID__.d/WHATEVER_NAME.conf` (assurez-vous que le fichier a l'extension `.conf`) puis rechargez nginx après vous être assuré que la configuration est valide à l'aide de `nginx -t`. From 5a6756a8c49f38a569d199a365463bb2cd82a52f Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 16 Aug 2023 18:18:30 +0200 Subject: [PATCH 14/22] Enhance FR login documentation --- doc/ADMIN_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 7822a12..3f3b568 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -24,7 +24,7 @@ La commande `php` pointera vers la version de PHP installée pour l'app. ### Ajouter ou modifier les fichiers -Après vous être connecté avec SFTP, sous le répertoire Web, vous verrez un dossier `www` qui contient les fichiers publics servis par cette application. Vous pouvez mettre tous les fichiers de votre application Web personnalisée à l'intérieur. +Après vous être connecté, sous le répertoire Web vous verrez un dossier `www` qui contient les fichiers publics servis par cette application. Vous pouvez mettre tous les fichiers de votre application Web personnalisée à l'intérieur. ### Personnaliser la configuration nginx From b6f86b2f4eaba45f94d42898773f00401a8da52f Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 16 Aug 2023 19:28:52 +0200 Subject: [PATCH 15/22] Jinja template for the POST_INSTALL doc --- doc/POST_INSTALL.md | 8 ++++++-- doc/POST_INSTALL_fr.md | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index a961614..bc1abcd 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,8 +1,12 @@ -If you have requested a database, here are information to log into it: +{% if database %} + +Here are information to log into the database: - Type: __DATABASE__ - Database user: __DB_USER__ - Database name: __DB_NAME__ - Password: __DB_PWD__ -The admin documentation below also contain information on how to connect using SFTP to edit the website content. +{% endif %} + +The admin documentation below contains information on how to connect using SFTP to edit the website content. diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md index bb975e7..32d4bce 100644 --- a/doc/POST_INSTALL_fr.md +++ b/doc/POST_INSTALL_fr.md @@ -1,8 +1,12 @@ -Si vous avez demandé une base de données, voici les informations pour s'y connecter : +{% if database %} + +Voici les informations pour se connecter à la base de donnée: - Type : __DATABASE__ - Utilisateur de la base de données : __DB_USER__ - Nom de la base de données : __DB_NAME__ - Mot de passe : __DB_PWD__ -La documentation ci-dessous contient également les informations pour se connecter en SSH et modifier le contenu du site web. +{% endif %} + +La documentation ci-dessous contient les informations pour se connecter en SSH et modifier le contenu du site web. From 0ba29961e5cda69eb9ef9b46416dde5b8357a14a Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 16 Aug 2023 19:33:41 +0200 Subject: [PATCH 16/22] Fix jinja template Co-authored-by: Alexandre Aubin --- doc/POST_INSTALL.md | 2 +- doc/POST_INSTALL_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index bc1abcd..b4496b8 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,4 +1,4 @@ -{% if database %} +{% if database != 'none' %} Here are information to log into the database: diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md index 32d4bce..de90822 100644 --- a/doc/POST_INSTALL_fr.md +++ b/doc/POST_INSTALL_fr.md @@ -1,4 +1,4 @@ -{% if database %} +{% if database != 'none' %} Voici les informations pour se connecter à la base de donnée: From fd0fe51048670a7c61d5c28909b9c3abc43c23f6 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 16 Aug 2023 22:48:31 +0200 Subject: [PATCH 17/22] Add password in tests --- tests.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests.toml b/tests.toml index 8cedce2..f37e638 100644 --- a/tests.toml +++ b/tests.toml @@ -7,8 +7,9 @@ test_format = 1.0 # ------------------------------- args.with_sftp = "1" + args.password = "SuperDuper_StrongPassw0rd" args.database = "none" - args.phpversion = "8.0" + args.phpversion = "8.0" test_upgrade_from.bf5d3ed.name = "Upgrade from 1.0~ynh14" test_upgrade_from.bf5d3ed.args.with_mysql = "0" From 05b98eafbab4af3f5406d6e401af2a6368250822 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 17 Aug 2023 12:41:11 +0200 Subject: [PATCH 18/22] Fix tests.toml --- tests.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests.toml b/tests.toml index f37e638..a8e8831 100644 --- a/tests.toml +++ b/tests.toml @@ -10,8 +10,9 @@ test_format = 1.0 args.password = "SuperDuper_StrongPassw0rd" args.database = "none" args.phpversion = "8.0" - test_upgrade_from.bf5d3ed.name = "Upgrade from 1.0~ynh14" + test_upgrade_from.bf5d3ed.name = "1.0~ynh14" test_upgrade_from.bf5d3ed.args.with_mysql = "0" + test_upgrade_from.bf5d3ed.args.password = "SuperDuper_StrongPassw0rd" [80_test] @@ -27,8 +28,9 @@ test_format = 1.0 only = ["install.subdir", "backup_restore", "upgrade", "upgrade.bf5d3ed" ] args.database = "mysql" - test_upgrade_from.bf5d3ed.name = "Upgrade from 1.0~ynh14" + test_upgrade_from.bf5d3ed.name = "1.0~ynh14" test_upgrade_from.bf5d3ed.args.with_mysql = "1" + test_upgrade_from.bf5d3ed.args.password = "SuperDuper_StrongPassw0rd" [postgresql_test] From 8d39c98681e1698283f106566d27e25685431480 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 17 Aug 2023 15:29:40 +0200 Subject: [PATCH 19/22] Fix tests.toml, again --- tests.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests.toml b/tests.toml index a8e8831..3abaf5d 100644 --- a/tests.toml +++ b/tests.toml @@ -12,6 +12,7 @@ test_format = 1.0 args.phpversion = "8.0" test_upgrade_from.bf5d3ed.name = "1.0~ynh14" test_upgrade_from.bf5d3ed.args.with_mysql = "0" + test_upgrade_from.bf5d3ed.args.domain = "sub.domain.tld" test_upgrade_from.bf5d3ed.args.password = "SuperDuper_StrongPassw0rd" [80_test] @@ -30,6 +31,7 @@ test_format = 1.0 args.database = "mysql" test_upgrade_from.bf5d3ed.name = "1.0~ynh14" test_upgrade_from.bf5d3ed.args.with_mysql = "1" + test_upgrade_from.bf5d3ed.args.domain = "sub.domain.tld" test_upgrade_from.bf5d3ed.args.password = "SuperDuper_StrongPassw0rd" [postgresql_test] From f65d02d7d04b90f212eec055a8a6f72d32132828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 27 Aug 2023 22:12:59 +0200 Subject: [PATCH 20/22] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 38c9f51..2ac8819 100644 --- a/manifest.toml +++ b/manifest.toml @@ -14,7 +14,7 @@ license = "GPL-3.0-only" code = "https://github.com/YunoHost-Apps/my_webapp_ynh" [integration] -yunohost = ">= 11.1.19" +yunohost = ">= 11.2" architectures = "all" multi_instance = true ldap = "not_relevant" From 18c71da0445c898e467dde19d4e874b248991410 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 31 Aug 2023 17:50:48 +0200 Subject: [PATCH 21/22] Bump yunohost requirement --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 38c9f51..2be35b6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -14,7 +14,7 @@ license = "GPL-3.0-only" code = "https://github.com/YunoHost-Apps/my_webapp_ynh" [integration] -yunohost = ">= 11.1.19" +yunohost = ">= 11.2.4" architectures = "all" multi_instance = true ldap = "not_relevant" From 2e7f35d11b98c01607e8446e86c6131c04c44cc0 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 14 Sep 2023 16:40:33 +0200 Subject: [PATCH 22/22] Fix tests.toml, again? --- tests.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests.toml b/tests.toml index 3abaf5d..a94ffe7 100644 --- a/tests.toml +++ b/tests.toml @@ -13,6 +13,7 @@ test_format = 1.0 test_upgrade_from.bf5d3ed.name = "1.0~ynh14" test_upgrade_from.bf5d3ed.args.with_mysql = "0" test_upgrade_from.bf5d3ed.args.domain = "sub.domain.tld" + test_upgrade_from.bf5d3ed.args.path = "/" test_upgrade_from.bf5d3ed.args.password = "SuperDuper_StrongPassw0rd" [80_test] @@ -32,6 +33,7 @@ test_format = 1.0 test_upgrade_from.bf5d3ed.name = "1.0~ynh14" test_upgrade_from.bf5d3ed.args.with_mysql = "1" test_upgrade_from.bf5d3ed.args.domain = "sub.domain.tld" + test_upgrade_from.bf5d3ed.args.path = "/" test_upgrade_from.bf5d3ed.args.password = "SuperDuper_StrongPassw0rd" [postgresql_test]