1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wallabag2_ynh.git synced 2024-10-01 13:35:06 +02:00

Specify PHP version in every calls (#132)

* Specify PHP version in every calls

* Switch (back) to php7.4

* Add PHP-xml dependency for DOM extension

Co-authored-by: lapineige <lapineige@users.noreply.github.com>
This commit is contained in:
tituspijean 2022-05-25 09:46:54 +02:00 committed by GitHub
parent 1f2c63c417
commit 9b184441eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View file

@ -4,8 +4,10 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
phpversion="7.4"
# dependencies used by the app # dependencies used by the app
pkg_dependencies="php$YNH_DEFAULT_PHP_VERSION-cli php$YNH_DEFAULT_PHP_VERSION-mysql php$YNH_DEFAULT_PHP_VERSION-json php$YNH_DEFAULT_PHP_VERSION-gd php$YNH_DEFAULT_PHP_VERSION-tidy php$YNH_DEFAULT_PHP_VERSION-curl php$YNH_DEFAULT_PHP_VERSION-php-gettext php$YNH_DEFAULT_PHP_VERSION-redis" pkg_dependencies="php$phpversion-cli php$phpversion-mysql php$phpversion-json php$phpversion-gd php$phpversion-tidy php$phpversion-curl php-gettext php$phpversion-redis php$phpversion-xml"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -96,7 +96,7 @@ ynh_add_nginx_config
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config --phpversion=$phpversion
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
@ -121,7 +121,7 @@ ynh_replace_string --match_string="secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv" --rep
ynh_replace_string --match_string="domain_name: https://your-wallabag-url-instance.com" --replace_string="domain_name: https://$domain$path_url" --target_file=$wb_conf ynh_replace_string --match_string="domain_name: https://your-wallabag-url-instance.com" --replace_string="domain_name: https://$domain$path_url" --target_file=$wb_conf
# Alias for php-cli execution command # Alias for php-cli execution command
php_exec="ynh_exec_as $app php "$final_path/bin/console" --no-interaction --env=prod" php_exec="ynh_exec_as $app php$phpversion "$final_path/bin/console" --no-interaction --env=prod"
# Set permissions to app files # Set permissions to app files
chown -R $app: $final_path chown -R $app: $final_path

View file

@ -123,7 +123,7 @@ ynh_install_app_dependencies $pkg_dependencies
ynh_script_progression --message="Upgrading PHP-FPM configuration..." ynh_script_progression --message="Upgrading PHP-FPM configuration..."
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config --phpversion=$phpversion
# Set-up fail2ban # Set-up fail2ban
# Create the log file is not already existing # Create the log file is not already existing
@ -164,7 +164,7 @@ then
#================================================= #=================================================
# Alias for php-cli execution command # Alias for php-cli execution command
php_exec="ynh_exec_as $app php "$final_path/bin/console" --no-interaction --env=prod" php_exec="ynh_exec_as $app php$phpversion "$final_path/bin/console" --no-interaction --env=prod"
# Set permissions to app files # Set permissions to app files
chown -R $app: $final_path chown -R $app: $final_path