1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mongo-express_ynh.git synced 2024-09-03 19:46:04 +02:00

Use of latest Mongo script

Use of latest Mongo script
This commit is contained in:
Gérard Collin 2023-02-14 14:35:55 +01:00 committed by GitHub
commit 4816cb689b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 17 deletions

View file

@ -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

View file

@ -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 dinté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 dinstaller Mongo Express rapidement et simplement sur un serveur YunoHost.
Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment linstaller et en profiter.*
## Vue d'ensemble
## Vue densemble
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 : <https://github.com/mongo-express/mongo-express>
* Dépôt de code officiel de lapp : <https://github.com/mongo-express/mongo-express>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_mongo-express>
* Signaler un bug : <https://github.com/YunoHost-Apps/mongo-express_ynh/issues>
@ -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 :** <https://yunohost.org/packaging_apps>
**Plus dinfos sur le packaging dapplications :** <https://yunohost.org/packaging_apps>

View file

@ -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",

View file

@ -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