diff --git a/README.md b/README.md index 4ebae31..a45afa4 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,16 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Kanban project management software +Kanboard is a free and open source Kanban project management software. + +### Features + +- Visualize your work +- Limit your work in progress to focus on your goal +- Drag and drop tasks to manage your project +- Self-hosted +- Super simple installation + **Shipped version:** 1.2.22~ynh1 diff --git a/README_fr.md b/README_fr.md index a2f3ae1..2f28af3 100644 --- a/README_fr.md +++ b/README_fr.md @@ -15,7 +15,14 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Logiciel de gestion de projet Kanban +Kanboard est un logiciel de gestion de projet Kanban gratuit et open source. + +### Fonctionnalités + +- Visualisez votre travail +- Limitez votre travail en cours pour vous concentrer sur votre objectif +- Glisser et déposez des tâches pour gérer votre projet +- Auto-hébergé **Version incluse :** 1.2.22~ynh1 diff --git a/check_process b/check_process index 82cfcb1..5ca5d45 100644 --- a/check_process +++ b/check_process @@ -12,11 +12,12 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=c20bdd69644de72736cdc4438a36faab9ab24c72 + #1.2.21~ynh3 + upgrade=1 from_commit=b667e4d5fd9cc860f706ad7e4e41208cf1d04f2a backup_restore=1 multi_instance=1 change_url=1 ;;; Upgrade options - ; commit=c20bdd69644de72736cdc4438a36faab9ab24c72 - name=Merge pull request #114 from YunoHost-Apps/testing + ; commit=b667e4d5fd9cc860f706ad7e4e41208cf1d04f2a + name=Merge pull request #133 from YunoHost-Apps/testing manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=Yes& diff --git a/conf/config.php b/conf/config.php index 2a097d3..1060ce3 100644 --- a/conf/config.php +++ b/conf/config.php @@ -1,24 +1,32 @@ /dev/null diff --git a/conf/cron_kanboard b/conf/cron_kanboard deleted file mode 100644 index 9d2d511..0000000 --- a/conf/cron_kanboard +++ /dev/null @@ -1,2 +0,0 @@ -# Execute the daily cronjob at 8am -0 8 * * * __APP__ cd "__FINALPATH__" && PHP__PHPVERSION__ ./cli cronjob >/dev/null 2>&1 diff --git a/conf/nginx.conf b/conf/nginx.conf index 4731a80..63d1f6b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,7 +6,7 @@ location __PATH__/ { index index.php; client_max_body_size 50M; - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ __PATH__/index.php; # Override CSP header to make SSOWAT user panel compatible with kanboard more_set_headers "Content-Security-Policy: default-src 'self' 'unsafe-eval' data:; style-src 'self' 'unsafe-inline'"; diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..f5d50c7 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,9 @@ +Kanboard is a free and open source Kanban project management software. + +### Features + +- Visualize your work +- Limit your work in progress to focus on your goal +- Drag and drop tasks to manage your project +- Self-hosted +- Super simple installation diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..9f3a2a6 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,8 @@ +Kanboard est un logiciel de gestion de projet Kanban gratuit et open source. + +### Fonctionnalités + +- Visualisez votre travail +- Limitez votre travail en cours pour vous concentrer sur votre objectif +- Glisser et déposez des tâches pour gérer votre projet +- Auto-hébergé diff --git a/manifest.json b/manifest.json index 31e1196..187388e 100644 --- a/manifest.json +++ b/manifest.json @@ -34,7 +34,7 @@ "multi_instance": true, "services": [ "nginx", - "php7.4-fpm", + "php8.0-fpm", "mysql" ], "arguments": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 85d65c3..168ac6c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,9 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.4" +YNH_PHP_VERSION="8.0" -pkg_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysql" +pkg_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-ldap" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 4ddf7a7..cdeb5d9 100644 --- a/scripts/backup +++ b/scripts/backup @@ -74,4 +74,4 @@ ynh_mysql_dump_db --database="$db_name" > db.sql # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for Kanboard. (YunoHost will then actually copy those files to the archive)." +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 6d24ff0..32a4874 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -127,4 +127,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for Kanboard" --last +ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/install b/scripts/install index 19c83da..8d8c899 100644 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,11 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ### Remove this function if there's nothing to clean before calling the remove script. + true +} +# Exit if an error occurs during the execution of the script ynh_abort_if_errors #================================================= @@ -21,8 +26,8 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH -admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC +admin=$YNH_APP_ARG_ADMIN email=$(ynh_user_get_info --username=$admin --key=mail) phpversion=$YNH_PHP_VERSION @@ -31,7 +36,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." +ynh_script_progression --message="Validating installation parameters..." --weight=1 # Check destination directory final_path=/var/www/$app @@ -43,10 +48,10 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." +ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=adminusername --value=$admin +ynh_app_setting_set --app=$app --key=admin --value=$admin #================================================= # INSTALL DEPENDENCIES @@ -92,14 +97,6 @@ chmod -R 700 $final_path/sessions chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 - -# Create a dedicated nginx config -ynh_add_nginx_config - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -109,12 +106,20 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=16 ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 + +# Create a dedicated nginx config +ynh_add_nginx_config + #================================================= # SPECIFIC SETUP #================================================= # CREATE CONFIG.PHP #================================================= -ynh_script_progression --message="Configuring Kanboard..." +ynh_script_progression --message="Configuring the app..." dir="__DIR__" ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" @@ -127,7 +132,7 @@ chown $app "$final_path/config.php" #================================================= ynh_script_progression --message="Initializing database..." --weight=7 -ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name" < "${final_path}/app/Schema/Sql/mysql.sql" +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "$final_path/app/Schema/Sql/mysql.sql" pushd $final_path # Launch database migration @@ -146,23 +151,23 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-error.log" --failregex #================================================= ynh_script_progression --message="Setuping a cron..." --weight=1 -ynh_add_config --template="../conf/cron_kanboard" --destination="/etc/cron.d/$app" - +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=2 +ynh_script_progression --message="Configuring permissions..." --weight=2 # Make app public or private if [ $is_public -eq 1 ] then ynh_permission_update --permission="main" --add="visitors" - ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/config.php" - ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/config.php" ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$final_path/config.php" - ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/config.php" else ynh_app_setting_set --app=$app --key=unprotected_uris --value="/jsonrpc.php" fi @@ -183,4 +188,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of Kanboard completed" --last +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index ab73e0d..0ea5c65 100644 --- a/scripts/remove +++ b/scripts/remove @@ -42,7 +42,7 @@ ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing Kanboard main directory..." +ynh_script_progression --message="Removing the app main directory..." # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -100,4 +100,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of Kanboard completed" --last +ynh_script_progression --message="Removal of $app completed" --last diff --git a/scripts/restore b/scripts/restore index 4ab6e7c..925e75f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -34,16 +34,11 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -55,7 +50,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring Kanboard main directory..." --weight=5 +ynh_script_progression --message="Restoring the app main directory..." --weight=5 ynh_restore_file --origin_path="$final_path" @@ -67,13 +62,16 @@ chown -R $app $final_path/{data,plugins,sessions} #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=6 +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=5 -# Restore the file first, so it can have a backup if different 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 NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # SPECIFIC RESTORATION @@ -109,6 +107,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Restoring the cron file..." --weight=2 ynh_restore_file --origin_path="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" #================================================= @@ -125,4 +124,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for Kanboard" --last +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index 011e4a1..dac6cb1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,14 +18,10 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -admin=$(ynh_app_setting_get --app=$app --key=adminusername) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) +admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) phpversion=$YNH_PHP_VERSION -email=$(ynh_user_get_info --username=$admin --key=mail) #================================================= # CHECK VERSION @@ -36,7 +32,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up Kanboard before upgrading (may take a while)..." --weight=5 +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=5 # Backup the current version of the app ynh_backup_before_upgrade @@ -95,7 +91,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=3 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.php" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/data $final_path/config.php" fi mkdir -p $final_path/sessions/ @@ -106,13 +102,6 @@ chmod -R 700 $final_path/sessions chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 - -# Create a dedicated NGINX config -ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES @@ -129,10 +118,18 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5 # Create a dedicated PHP-FPM config ynh_add_fpm_config +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # UPGRADE KANBOARD #================================================= -ynh_script_progression --message="Upgrading Kanboard..." --weight=2 +ynh_script_progression --message="Upgrading the app..." --weight=2 pushd $final_path # Launch database migration @@ -151,29 +148,12 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-error.log" --failregex #================================================= # SETUP CRON #================================================= -ynh_script_progression --message="Setuping a cron..." - -ynh_add_config --template="../conf/cron_kanboard" --destination="/etc/cron.d/$app" +ynh_script_progression --message="Setuping a cron..." --weight=2 +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=2 - -# Make app public or private -if [ $is_public -eq 1 ] -then - ynh_permission_update --permission="main" --add="visitors" - ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/config.php" - ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/config.php" - ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$final_path/config.php" - ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/config.php" -else - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/jsonrpc.php" -fi - #================================================= # RELOAD NGINX #================================================= @@ -185,4 +165,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of Kanboard completed" --last +ynh_script_progression --message="Installation of $app completed" --last