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

Merge branch 'testing' into enh_enable_MFA_email

This commit is contained in:
Éric Gaspar 2023-11-09 10:11:20 +01:00
commit 041afb0ee6
8 changed files with 16 additions and 60 deletions

View file

@ -29,7 +29,7 @@ Monica is an open-source web application to organize the interactions with your
* Official app website: <https://monicahq.com>
* Upstream app code repository: <https://github.com/monicahq/monica>
* YunoHost documentation for this app: <https://yunohost.org/app_monica>
* YunoHost Store: <https://apps.yunohost.org/app/monica>
* Report a bug: <https://github.com/YunoHost-Apps/monica_ynh/issues>
## Developer info

View file

@ -29,7 +29,7 @@ Monica is an open-source web application to organize the interactions with your
* Site officiel de lapp : <https://monicahq.com>
* Dépôt de code officiel de lapp : <https://github.com/monicahq/monica>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_monica>
* YunoHost Store: <https://apps.yunohost.org/app/monica>
* Signaler un bug : <https://github.com/YunoHost-Apps/monica_ynh/issues>
## Informations pour les développeurs

View file

@ -15,7 +15,7 @@ website = "https://monicahq.com"
code = "https://github.com/monicahq/monica"
[integration]
yunohost = ">= 11.1.15"
yunohost = ">= 11.2"
architectures = "all"
multi_instance = true
ldap = false
@ -39,7 +39,7 @@ ram.runtime = "50M"
[install.language]
ask.en = "Choose the application language"
ask.fr = "Choisissez la langue de l'application"
type = "string"
type = "select"
choices = ["cs", "de", "en", "es", "fr", "he", "it", "nl", "pt", "ru", "zh"]
default = "en"
@ -66,7 +66,7 @@ ram.runtime = "50M"
main.url = "/"
[resources.apt]
packages = "mariadb-server php8.1-bcmath php8.1-cli php8.1-curl php8.1-dom php8.1-gd php8.1-gmp php8.1-iconv php8.1-intl php8.1-mbstring php8.1-mysql php8.1-mysqli php8.1-opcache php8.1-redis php8.1-xml php8.1-zip"
packages = "mariadb-server, php8.1-bcmath, php8.1-cli, php8.1-curl, php8.1-dom, php8.1-gd, php8.1-gmp, php8.1-iconv, php8.1-intl, php8.1-mbstring, php8.1-mysql, php8.1-mysqli, php8.1-opcache, php8.1-redis, php8.1-xml, php8.1-zip"
extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main"
extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg"

View file

@ -8,8 +8,6 @@
YNH_COMPOSER_VERSION="2.5.1"
NODEJS_VERSION=18
#=================================================

View file

@ -55,11 +55,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated NGINX config
ynh_add_nginx_config
@ -81,9 +76,7 @@ chown -R $app:www-data "$install_dir"
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
config="$install_dir/.env"
ynh_add_config --template=../conf/.env --destination=$install_dir/.env
ynh_add_config --template=".env" --destination="$install_dir/.env"
chmod 600 $install_dir/.env
chown $app:$app $install_dir/.env
@ -124,7 +117,7 @@ update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION}
#=================================================
ynh_script_progression --message="Setuping a cron..." --weight=1
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"

View file

@ -17,29 +17,12 @@ ynh_script_progression --message="Removing NGINX web server configuration..." --
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_nodejs
#=================================================
# SPECIFIC REMOVE
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing various files..." --weight=1
# Remove a cron file
ynh_secure_remove --file="/etc/cron.d/$app"

View file

@ -20,6 +20,13 @@ ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
ynh_script_progression --message="Restoring the MySQL database..." --weight=1
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
#=================================================
# SPECIFIC RESTORATION
#=================================================
@ -37,28 +44,8 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
ynh_script_progression --message="Restoring the MySQL database..." --weight=1
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
#=================================================
# RESTORE VARIOUS FILES
#=================================================
ynh_script_progression --message="Restoring various files..." --weight=1
ynh_restore_file --origin_path="/etc/cron.d/$app"
#=================================================

View file

@ -76,11 +76,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config
ynh_add_nginx_config
@ -105,7 +100,7 @@ ynh_script_progression --message="Updating a configuration file..." --weight=1
ynh_backup_if_checksum_is_different --file="$install_dir/.env"
ynh_add_config --template=../conf/.env --destination=$install_dir/.env
ynh_add_config --template=".env" --destination="$install_dir/.env"
#=================================================
# DEPLOYMENT
@ -156,7 +151,7 @@ ynh_store_file_checksum --file="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown $app:$app "$install_dir/.env"
update-alternatives --set php /usr/bin/php${YNH_DEFAULT_PHP_VERSION}
update-alternatives --set php /usr/bin/php${YNH_PHP_VERSION}
#=================================================
# INSTALL THE CRON FILE