From 3ff8701f38b9ff9351e858c5ca62dd1128c6add1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Thu, 26 Jan 2023 17:01:03 +0100 Subject: [PATCH 1/2] Upgraded mongo install script --- manifest.json | 2 +- scripts/ynh_mongo_db__2 | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 2b0db6d..9fe62d3 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "An admin server for Mongo and optionally a Mongo database", "fr": "Un serveur d'administration pour Mongo ainsi qu'optionnellement une base Mongo" }, - "version": "1.0~ynh3", + "version": "1.0~ynh4", "url": "https://github.com/mongo-express/mongo-express", "upstream": { "license": "MIT", diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index 7fac585..e1c17a6 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -1,7 +1,7 @@ #!/bin/bash readonly YNH_DEFAULT_MONGO_VERSION=4.4 -# Declare the actual MongoDB version to use: 4.4 ; 5.0 +# Declare the actual MongoDB version to use: 4.4 ; 5.0 ; 6.0 # A packager willing to use another version of MongoDB can override the variable into its _common.sh. YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} @@ -312,13 +312,25 @@ ynh_install_mongo() { ynh_handle_getopts_args "$@" mongo_version="${mongo_version:-$YNH_MONGO_VERSION}" - ynh_print_info --message="Installing MongoDB Community Edition..." - ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $(ynh_get_debian_release)/mongodb-org/$mongo_version main" --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" + ynh_print_info --message="Installing MongoDB Community Edition ..." + local mongo_debian_release=$(ynh_get_debian_release) + + if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then + ynh_print_warn --message="Installing Mongo 4.4 as $mongo_version is not compatible with your cpu (see https://docs.mongodb.com/manual/administration/production-notes/#x86_64)." + mongo_version="4.4" + fi + if [[ "$mongo_version" == "4.4" && "$mongo_debian_release" != "buster" ]]; then + ynh_print_warn --message="Switched to buster install as Mongo 4.4 is not compatible with $mongo_debian_release." + mongo_debian_release=buster + fi + + ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" mongodb_servicename=mongod # Make sure MongoDB is started and enabled systemctl enable $mongodb_servicename --quiet systemctl daemon-reload --quiet + ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$mongodb_servicename.log" # Integrate MongoDB service in YunoHost From ab61e87f7623a1d7831a1a143c1f3608533f71dc Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 26 Jan 2023 16:01:10 +0000 Subject: [PATCH 2/2] Auto-update README --- README.md | 4 ++-- README_fr.md | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index cb8b617..a33b122 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Mongo Express for YunoHost -[![Integration level](https://dash.yunohost.org/integration/mongo-express.svg)](https://dash.yunohost.org/appci/app/mongo-express) ![Working status](https://ci-apps.yunohost.org/ci/badges/mongo-express.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mongo-express.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/mongo-express.svg)](https://dash.yunohost.org/appci/app/mongo-express) ![Working status](https://ci-apps.yunohost.org/ci/badges/mongo-express.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mongo-express.maintain.svg) [![Install Mongo Express with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mongo-express) *[Lire ce readme en français.](./README_fr.md)* @@ -37,7 +37,7 @@ You can as well install a Mongo database - version 4, 5 or 6 in your yunohost se - Supports replica sets -**Shipped version:** 1.0~ynh3 +**Shipped version:** 1.0~ynh4 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 42b703b..de802a5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,15 @@ It shall NOT be edited by hand. # Mongo Express pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/mongo-express.svg)](https://dash.yunohost.org/appci/app/mongo-express) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mongo-express.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mongo-express.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/mongo-express.svg)](https://dash.yunohost.org/appci/app/mongo-express) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mongo-express.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mongo-express.maintain.svg) [![Installer Mongo Express avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mongo-express) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Mongo Express 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.* +> *Ce package vous permet d’installer Mongo Express 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 +## Vue d’ensemble Mongo Express is a Web-based MongoDB admin interface written with Node.js, Express and Bootstrap3. You can as well install a Mongo database - version 4, 5 or 6 in your yunohost server if you want @@ -37,13 +37,13 @@ You can as well install a Mongo database - version 4, 5 or 6 in your yunohost se - Supports replica sets -**Version incluse :** 1.0~ynh3 +**Version incluse :** 1.0~ynh4 -## Captures d'écran +## Captures d’écran -![Capture d'écran de Mongo Express](./doc/screenshots/document-edit.png) -![Capture d'écran de Mongo Express](./doc/screenshots/collection-view.png) -![Capture d'écran de Mongo Express](./doc/screenshots/databases-view.png) +![Capture d’écran de Mongo Express](./doc/screenshots/document-edit.png) +![Capture d’écran de Mongo Express](./doc/screenshots/collection-view.png) +![Capture d’écran de Mongo Express](./doc/screenshots/databases-view.png) ## Avertissements / informations importantes @@ -59,7 +59,7 @@ You can as well install a Mongo database - version 4, 5 or 6 in your yunohost se ## Documentations et ressources -* Dépôt de code officiel de l'app : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -75,4 +75,4 @@ ou sudo yunohost app upgrade mongo-express -u https://github.com/YunoHost-Apps/mongo-express_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file