diff --git a/conf/.env b/conf/.env index 9f586c4..5530762 100644 --- a/conf/.env +++ b/conf/.env @@ -4,7 +4,7 @@ # Two choices: local|production. Use local if you want to install Monica as a # development version. Use production otherwise. -APP_ENV=local +APP_ENV=production # true if you want to show debug information on errors. For production, put this # to false. diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf index 700c37c..151b0c1 100644 --- a/conf/extra_php-fpm.conf +++ b/conf/extra_php-fpm.conf @@ -1,4 +1,4 @@ -; Additional php.ini defines, specific to this pool of workers. - -php_admin_value[upload_max_filesize] = 50M -php_admin_value[post_max_size] = 50M +; Additional php.ini defines, specific to this pool of workers. + +php_admin_value[upload_max_filesize] = 50M +php_admin_value[post_max_size] = 50M \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index 1a48402..9ccd1d9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -77,4 +77,4 @@ ram.runtime = "50M" extras.yarn.packages = "yarn" [resources.database] - type = "mysql" + type = "mysql" \ No newline at end of file diff --git a/scripts/_common.sh b/scripts/_common.sh index b02dd0b..b6e36fe 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_COMPOSER_VERSION="2.6.5" -NODEJS_VERSION=18 +NODEJS_VERSION="20" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 35afc88..1008ecb 100755 --- a/scripts/backup +++ b/scripts/backup @@ -22,21 +22,13 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# BACKUP VARIOUS FILES -#================================================= - ynh_backup --src_path="/etc/cron.d/$app" #================================================= diff --git a/scripts/change_url b/scripts/change_url index ffe543d..ee781df 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -25,6 +25,7 @@ ynh_change_url_nginx_config # Run monica update pushd "$install_dir" /usr/bin/php$phpversion artisan monica:update --force + /usr/bin/php$phpversion artisan optimize:clear popd #================================================= diff --git a/scripts/install b/scripts/install index 4227f21..991f0f3 100755 --- a/scripts/install +++ b/scripts/install @@ -57,9 +57,9 @@ ynh_add_nginx_config #================================================= # INSTALL COMPOSER DEPENDENCIES #================================================= -ynh_script_progression --message="Installing Composer dependencies..." +ynh_script_progression --message="Installing composer dependencies..." -ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --composerversion="$YNH_COMPOSER_VERSION" --workdir="$install_dir" +ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir" chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" @@ -85,11 +85,11 @@ ynh_replace_string --target_file="$install_dir/package.json" --match_string="php #================================================= # DEPLOY #================================================= -ynh_script_progression --message="Deploying $app..." +ynh_script_progression --message="Deploying..." pushd "$install_dir" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install --production + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn run production ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password=$password ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan passport:client --password -n > key.txt @@ -101,6 +101,7 @@ pushd "$install_dir" ynh_app_setting_set --app=$app --key=mobile_key --value=$mobile_key ynh_secure_remove --file="$install_dir/key.txt" ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan config:cache + ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan optimize:clear popd # Calculate and store the config file checksum into the app settings @@ -109,13 +110,6 @@ ynh_store_file_checksum --file="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" -#================================================== -# FIX PHP VERSION -#================================================== -ynh_script_progression --message="Fixing PHP version in package.json..." --weight=1 - -ynh_replace_string --target_file="$install_dir/package.json" --match_string="php artisan lang:generate -vvv" --replace_string="php$phpversion artisan lang:generate -vvv" - #================================================= # INSTALL THE CRON FILE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f08b1dd..de7b9a5 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,7 +38,6 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION #================================================= ynh_script_progression --message="Updating $app's configuration files..." --weight=1 -# Create a dedicated PHP-FPM config ynh_add_fpm_config # Create a dedicated NGINX config @@ -108,26 +107,12 @@ pushd "$install_dir" ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan config:cache popd -#if ynh_version_gt "2.15.0" "${previous_version}" ; then -# ynh_script_progression --message="Upgrading for 2.15.0..." -# pushd "$install_dir" -# ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan monica:moveavatarstophotosdirectory -# popd -#fi - # Calculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" -#================================================== -# FIX PHP VERSION -#================================================== -ynh_script_progression --message="Fixing PHP version in package.json..." --weight=1 - -ynh_replace_string --target_file="$install_dir/package.json" --match_string="php artisan lang:generate -vvv" --replace_string="php$phpversion artisan lang:generate -vvv" - #================================================= # INSTALL THE CRON FILE #================================================= diff --git a/tests.toml b/tests.toml index 242423a..cbbeef1 100644 --- a/tests.toml +++ b/tests.toml @@ -1,5 +1,3 @@ test_format = 1.0 [default] - - test_upgrade_from.272460bc.name = "Upgrade from 3.7.0~ynh2"