1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/plainpad_ynh.git synced 2024-09-03 20:05:53 +02:00

Merge pull request #2 from YunoHost-Apps/8.0

8.0
This commit is contained in:
Éric Gaspar 2022-04-08 16:36:56 +02:00 committed by GitHub
commit 8c3ad6c725
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 32 additions and 29 deletions

View file

@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Plainpad is a self hosted, open source note taking application that is very easy to setup on your server. Your data will never leave your server and you will be able to access them from any device connected to the internet.
With Plainpad you can allow multiple users to access the application without being able to see each other's notes. The notes are being encrypted and stored safely in the database.
**Shipped version:** 1.0.0~ynh1
**Shipped version:** 1.0.0~ynh2
**Demo:** https://alextselegidis.com/try/plainpad/#/login

View file

@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Plainpad is a self hosted, open source note taking application that is very easy to setup on your server. Your data will never leave your server and you will be able to access them from any device connected to the internet.
With Plainpad you can allow multiple users to access the application without being able to see each other's notes. The notes are being encrypted and stored safely in the database.
**Version incluse :** 1.0.0~ynh1
**Version incluse :** 1.0.0~ynh2
**Démo :** https://alextselegidis.com/try/plainpad/#/login

View file

@ -44,7 +44,7 @@ DB_PORT=3306
DB_DATABASE=__DB_NAME__
# The database username for the connection.
DB_USERNAME=__DB_NAME__
DB_USERNAME=__DB_USER__
# The database password for the connection.
DB_PASSWORD=__DB_PWD__

View file

@ -6,7 +6,7 @@ location __PATH__/ {
index index.php index.html;
#client_max_body_size 50M;
client_max_body_size 50M;
try_files $uri $uri/ __PATH__/__PATH__/index.php?$query_string;
@ -20,7 +20,4 @@ location __PATH__/ {
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}

View file

@ -3,10 +3,10 @@
"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~ynh1",
"version": "1.0.0~ynh2",
"url": "https://alextselegidis.com/get/plainpad",
"upstream": {
"license": "AGPL-3.0-only",
@ -26,7 +26,7 @@
"multi_instance": true,
"services": [
"nginx",
"php7.3-fpm",
"php8.0-fpm",
"mysql"
],
"arguments": {

View file

@ -4,9 +4,9 @@
# COMMON VARIABLES
#=================================================
YNH_PHP_VERSION="7.3"
YNH_PHP_VERSION="8.0"
pkg_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysql"
pkg_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysql"
#=================================================
# PERSONAL HELPERS

View file

@ -28,6 +28,7 @@ domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
key=$(ynh_string_random --length=32)
phpversion=$YNH_PHP_VERSION
app=$YNH_APP_INSTANCE_NAME
@ -122,7 +123,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 +146,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"
#=================================================

View file

@ -29,14 +29,6 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=2
# Remove a database if it exists, along with the associated user
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR
#=================================================
@ -61,6 +53,14 @@ 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_app_dependencies
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================

View file

@ -70,13 +70,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
#=================================================
@ -85,6 +78,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
#=================================================

View file

@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
phpversion=$YNH_PHP_VERSION
#=================================================
# CHECK VERSION