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:
commit
d29d72be30
5 changed files with 10 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
||||
**Shipped version:** 0.2~ynh4
|
||||
**Shipped version:** 0.2~ynh5
|
||||
|
||||
**Demo:** https://dont-code.net/apps.html
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
**Version incluse :** 0.2~ynh4
|
||||
**Version incluse :** 0.2~ynh5
|
||||
|
||||
**Démo :** https://dont-code.net/apps.html
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"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"
|
||||
},
|
||||
"version": "0.2~ynh4",
|
||||
"version": "0.2~ynh5",
|
||||
"url": "https://dont-code.net",
|
||||
"upstream": {
|
||||
"license": "AGPL-3.0-or-later",
|
||||
|
|
|
@ -104,7 +104,7 @@ ynh_install_java() {
|
|||
package_name=${package_name}-${java_engine}
|
||||
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
|
||||
ynh_app_setting_set --app=$app --key=java_version --value=$java_version
|
||||
|
|
|
@ -314,17 +314,19 @@ ynh_install_mongo() {
|
|||
|
||||
ynh_print_info --message="Installing MongoDB Community Edition ..."
|
||||
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
|
||||
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="Keeping $mongo_debian_release install for Mongo 4.4 to see if that works."
|
||||
#mongo_debian_release=buster
|
||||
if [[ "$mongo_version" == "4.4" ]]; then
|
||||
ynh_print_warn --message="Switching to buster package install for Mongo 4.4."
|
||||
mongo_debian_release=buster
|
||||
mongo_packages="mongodb-org-server mongodb-database-tools mongodb-mongosh-shared-openssl11"
|
||||
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
|
||||
|
||||
# Make sure MongoDB is started and enabled
|
||||
|
|
Loading…
Reference in a new issue