diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..7cbe275 Binary files /dev/null and b/.DS_Store differ diff --git a/DISCLAIMER.md b/DISCLAIMER.md deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md index ff4c0f9..054d0d2 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Membership management web application for non profit organizations -**Shipped version:** 0.9.5~ynh1 +**Shipped version:** 0.9.4.2~ynh1 **Demo:** https://demo.galette.eu/login @@ -25,6 +25,13 @@ Membership management web application for non profit organizations ![](./doc/screenshots/edit_member.png) +## Disclaimers / important information + +## Configuration + +1. The app will require to complete the registration process after the instllation is complete by visiting the domain on which Galette is installed. +1. The Postgresql database credentials will be sent to the admin mail. Fill these details while doing the registration process. + ## Documentation and resources * Official app website: https://www.galette.eu diff --git a/README_fr.md b/README_fr.md index 412b9f3..79af070 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Outil de gestion d'adhérents et de cotisation en ligne pour associations -**Version incluse :** 0.9.5~ynh1 +**Version incluse :** 0.9.4.2~ynh1 **Démo :** https://demo.galette.eu/login @@ -21,6 +21,13 @@ Outil de gestion d'adhérents et de cotisation en ligne pour associations ![](./doc/screenshots/edit_member.png) +## Avertissements / informations importantes + +## Configuration + +1. Une fois l'installation terminée, l'application devra terminer le processus d'enregistrement en **visitant le domaine** sur lequel Galette est installé. +1. Les informations d'identification de la base de données Postgresql seront envoyées à **l'email admin**. Remplissez ces détails lors du processus d'inscription. + ## Documentations et ressources * Site officiel de l'app : https://www.galette.eu diff --git a/check_process b/check_process index 8347adf..dad0844 100644 --- a/check_process +++ b/check_process @@ -2,7 +2,6 @@ ; Manifest domain="domain.tld" path="/path" - admin="john" is_public=1 password="strong-password" ; Checks @@ -13,7 +12,7 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=65cd8b542310e8b349107ed222fdc57e3c2d239a + #upgrade=1 from_commit= backup_restore=1 multi_instance=1 change_url=0 @@ -21,6 +20,6 @@ Email=jean-baptiste@holcroft.fr Notification=all ;;; Upgrade options - ; commit=65cd8b542310e8b349107ed222fdc57e3c2d239a - name=Upgrade from 0.9.1.2 + ; commit= + name= manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1 diff --git a/conf/app.src b/conf/app.src index 5a1154b..5ca6c2e 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/galette/galette/archive/refs/tags/0.9.5.tar.gz -SOURCE_SUM=080193b1afa529484a2dead509f5df8a28f2d172a8e075d14b47a51c2b7c6265 +SOURCE_URL=https://download.tuxfamily.org/galette/galette-0.9.4.2.tar.bz2 +SOURCE_SUM=171bda8250cf0996d40a38e032d93881d67b059be98ed5af20ac00dbdf8630e3 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index ed48b0d..8ed74b8 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -11,10 +11,10 @@ location __PATH__/ { index index.html index.php; # Common parameter to increase upload size limit in conjuction with dedicated php-fpm file - #client_max_body_size 50M; + client_max_body_size 50M; try_files $uri $uri/ @__APP__; - + location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 0252212..c456af0 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -419,8 +419,8 @@ chdir = __FINALPATH__ ;php_admin_value[memory_limit] = 32M ; Common values to change to increase file upload limit -; php_admin_value[upload_max_filesize] = 50M -; php_admin_value[post_max_size] = 50M +php_admin_value[upload_max_filesize] = 50M +php_admin_value[post_max_size] = 50M ; php_admin_flag[mail.add_x_header] = Off ; Other common parameters @@ -428,4 +428,4 @@ chdir = __FINALPATH__ ; php_admin_value[max_input_time] = 300 ; php_admin_value[memory_limit] = 256M ; php_admin_flag[short_open_tag] = On -php_admin_value[date.timezone] = __TIMEZONE__ \ No newline at end of file +php_admin_value[date.timezone] = __TIMEZONE__ diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..bc45156 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,4 @@ +## Configuration + +1. The app will require to complete the registration process after the instllation is complete by visiting the domain on which Galette is installed. +1. The Postgresql database credentials will be sent to the admin mail. Fill these details while doing the registration process. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..4d95474 --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,4 @@ +## Configuration + +1. Une fois l'installation terminée, l'application devra terminer le processus d'enregistrement en **visitant le domaine** sur lequel Galette est installé. +1. Les informations d'identification de la base de données Postgresql seront envoyées à **l'email admin**. Remplissez ces détails lors du processus d'inscription. diff --git a/manifest.json b/manifest.json index 79fcb74..ec863ef 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Membership management web application for non profit organizations", "fr": "Outil de gestion d'adhérents et de cotisation en ligne pour associations" }, - "version": "0.9.5~ynh1", + "version": "0.9.4.2~ynh1", "url": "https://www.galette.eu", "upstream": { "license": "GPL-3.0-or-later", @@ -27,8 +27,7 @@ "multi_instance": true, "services": [ "nginx", - "php7.3-fpm", - "mysql" + "php7.3-fpm" ], "arguments": { "install": [ @@ -46,6 +45,10 @@ { "name": "is_public", "type": "boolean", + "help": { + "en": "If enabled, Galette will be accessible by people who do not have an account. This can be changed later via the webadmin.", + "fr": "Si cette case est cochée, Galette sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." + }, "default": true } ] diff --git a/scripts/install b/scripts/install index 45af0cf..f700a8f 100755 --- a/scripts/install +++ b/scripts/install @@ -97,7 +97,6 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 -# Create a dedicated PHP-FPM config ynh_add_fpm_config --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) @@ -114,8 +113,8 @@ ynh_add_config --template="../conf/config.inc.php.dist" --destination="$final_pa # SECURE FILES AND DIRECTORIES #================================================= -chown $app $final_path/galette/config -chmod 775 $final_path/galette/config +chown $app $final_path/galette/config +chmod g+rwx $final_path/galette/config for folder in attachments cache exports files imports logs photos templates_c tempimages do @@ -155,19 +154,19 @@ ynh_systemd_action --service_name=nginx --action=reload message="Galette need you to finish the installation manually. -Please open "$domain/$path_url" and finish the install process. +Please open "https://$domain/$path_url/installer.php" and finish the install process. Database information you'll need: -Type: pgsql -Host: localhost -Port: 5432 -User: "$db_name" -Password: "$db_pwd" -Name: "$db_name" +Type: pgsql +Host: localhost +Port: 5432 +User: "$db_name" +Password: "$db_pwd" +Name: "$db_name" Important! Once done, please remember to run as root or with sudo: -\`chmod -R 500 "$final_path/galette/config"\` -\`Remove "$final_path/galette/install"\` +Restrict the rights of the config file \`chmod -R 500 "$final_path/galette/config"\` +\`Remove the install file "$final_path/galette/install"\` If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/galette_ynh" diff --git a/scripts/restore b/scripts/restore index 54d79ba..512ee60 100644 --- a/scripts/restore +++ b/scripts/restore @@ -49,6 +49,7 @@ test ! -d $final_path \ # RESTORE THE NGINX CONFIGURATION #================================================= ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 + ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= @@ -99,13 +100,13 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name # RESTORE USER RIGHTS #================================================= -chown "$app" "$final_path/config" -chmod 750 "$final_path/config" +chown "$app" "$final_path/galette/config" +chmod 750 "$final_path/galette/config" for folder in attachments cache exports files imports logs photos templates_c tempimages do - chown "$app" "$final_path/data/$folder" - chmod 775 "$final_path/data/$folder" + chown "$app" "$final_path/galette/data/$folder" + chmod 775 "$final_path/galette/data/$folder" done #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c2acd07..705f109 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,8 @@ 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) -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) timezone="$(cat /etc/timezone)" @@ -52,19 +53,19 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=2 # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid "$app") - ynh_app_setting_set "$app" db_name "$db_name" + ynh_app_setting_set --app=$app --key=db_name --value=$db_name fi # If db_name doesn't exist, create it if [ -z "$db_pwd" ]; then - db_pwd=$(ynh_app_setting_get "$app" mysqlpassword) - ynh_app_setting_set "$app" mysqlpwd "$db_pwd" + db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) + ynh_app_setting_set --app=$app --key=psqlpwd --value=$db_pwd fi # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path="/var/www/$app" - ynh_app_setting_set "$app" final_path "$final_path" + ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi # Cleaning legacy permissions @@ -94,18 +95,22 @@ then mv "$final_path" "$final_path.old" ynh_setup_source "$final_path" - mv "$final_path"/galette/* "$final_path"/ - ynh_secure_remove "$final_path"/tests + #ynh_secure_remove "$final_path"/tests # when running automatic tests, there is no config.inc.php - if [ -e "$final_path.old/config/config.inc.php" ]; then - cp "$final_path.old/config/config.inc.php" "$final_path/config/config.inc.php" + if [ -e "$final_path.old/galette/config/config.inc.php" ]; then + cp "$final_path.old/galette/config/config.inc.php" "$final_path/galette/config/config.inc.php" + cp -r "$final_path.old/galette/data" "$final_path/galette/data" fi # delete temp directory ynh_secure_remove "$final_path.old" fi +chmod 750 $final_path +chmod -R o-rwx $final_path +chown -R $app:www-data $final_path + #================================================= # NGINX CONFIGURATION #================================================= @@ -144,13 +149,13 @@ ynh_use_logrotate --non-append # SECURE FILES AND DIRECTORIES #================================================= -chown "$app" "$final_path/config" -chmod 750 "$final_path/config" +chown "$app" "$final_path/galette/config" +chmod 750 "$final_path/galette/config" for folder in attachments cache exports files imports logs photos templates_c tempimages do - chown "$app" "$final_path/data/$folder" - chmod 775 "$final_path/data/$folder" + chown "$app" "$final_path/galette/data/$folder" + chmod 775 "$final_path/galette/data/$folder" done #=================================================