1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dont-code_ynh.git synced 2024-09-03 18:26:34 +02:00

Fiixed mongo 4.4 install on ci-server

This commit is contained in:
Gérard Collin 2023-07-20 08:09:38 +02:00 committed by GitHub
commit d29d72be30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 8 deletions

View file

@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to
- As well any documents or images uploaded by users will be backed up - As well any documents or images uploaded by users will be backed up
**Shipped version:** 0.2~ynh4 **Shipped version:** 0.2~ynh5
**Demo:** https://dont-code.net/apps.html **Demo:** https://dont-code.net/apps.html

View file

@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to
- As well any documents or images uploaded by users will be backed up - As well any documents or images uploaded by users will be backed up
**Version incluse :** 0.2~ynh4 **Version incluse :** 0.2~ynh5
**Démo :** https://dont-code.net/apps.html **Démo :** https://dont-code.net/apps.html

View file

@ -6,7 +6,7 @@
"en": "Install services and databases needed to support Dont-code platform", "en": "Install services and databases needed to support Dont-code platform",
"fr": "Installe les services et base de données nécessaires pour utiliser la plateforme Dont-code" "fr": "Installe les services et base de données nécessaires pour utiliser la plateforme Dont-code"
}, },
"version": "0.2~ynh4", "version": "0.2~ynh5",
"url": "https://dont-code.net", "url": "https://dont-code.net",
"upstream": { "upstream": {
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",

View file

@ -104,7 +104,7 @@ ynh_install_java() {
package_name=${package_name}-${java_engine} package_name=${package_name}-${java_engine}
fi fi
ynh_install_app_dependencies ca-certificates-java ${package_name} ynh_install_app_dependencies ${package_name}
# Store java_version into the config of this app # Store java_version into the config of this app
ynh_app_setting_set --app=$app --key=java_version --value=$java_version ynh_app_setting_set --app=$app --key=java_version --value=$java_version

View file

@ -314,17 +314,19 @@ ynh_install_mongo() {
ynh_print_info --message="Installing MongoDB Community Edition ..." ynh_print_info --message="Installing MongoDB Community Edition ..."
local mongo_debian_release=$(ynh_get_debian_release) local mongo_debian_release=$(ynh_get_debian_release)
local mongo_packages="mongodb-org-server mongodb-database-tools mongodb-org-shell"
if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then 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)." 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" mongo_version="4.4"
fi fi
if [[ "$mongo_version" == "4.4" && "$mongo_debian_release" != "buster" ]]; then if [[ "$mongo_version" == "4.4" ]]; then
ynh_print_warn --message="Keeping $mongo_debian_release install for Mongo 4.4 to see if that works." ynh_print_warn --message="Switching to buster package install for Mongo 4.4."
#mongo_debian_release=buster mongo_debian_release=buster
mongo_packages="mongodb-org-server mongodb-database-tools mongodb-mongosh-shared-openssl11"
fi 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" ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" --package="$mongo_packages" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc"
mongodb_servicename=mongod mongodb_servicename=mongod
# Make sure MongoDB is started and enabled # Make sure MongoDB is started and enabled