diff --git a/conf/.env.example b/conf/.env.example index b5445f7..c9abc48 100644 --- a/conf/.env.example +++ b/conf/.env.example @@ -6,7 +6,7 @@ APP_NAME=Plainpad # This value determines the "environment" your application is currently # running in. This may determine how you prefer to configure various # services the application utilizes. Set this in your ".env" file. -APP_ENV=production +APP_ENV=local # This key is used by the Illuminate encrypter service and should be set # to a random, 32 character string, otherwise these encrypted strings diff --git a/manifest.json b/manifest.json index 1866492..4e8371e 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "plainpad", "packaging_format": 1, "description": { - "en": "Self hosted, note taking application", - "fr": "Application de prise de notes auto-hébergée" + "en": "Note taking application", + "fr": "Prise de notes auto-hébergée" }, "version": "1.0.0~ynh2", "url": "https://alextselegidis.com/get/plainpad", diff --git a/scripts/install b/scripts/install index 1e30b91..51437a6 100755 --- a/scripts/install +++ b/scripts/install @@ -122,7 +122,7 @@ chown $app:$app "$final_path/.env" ynh_script_progression --message="Migrating database..." --weight=1 pushd "$final_path" - php$phpversion artisan migrate:fresh --seed + php$phpversion artisan migrate:fresh -n --seed popd #================================================= @@ -145,6 +145,7 @@ if [ $is_public -eq 1 ] then ynh_permission_update --permission="main" --add="visitors" fi + ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" #================================================= diff --git a/scripts/restore b/scripts/restore index 0709231..4536eb7 100755 --- a/scripts/restore +++ b/scripts/restore @@ -73,13 +73,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -88,6 +81,16 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" + +# Recreate a dedicated PHP-FPM config +ynh_add_fpm_config + #================================================= # RESTORE THE MYSQL DATABASE #=================================================