1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/koel_ynh.git synced 2024-09-03 19:35:54 +02:00
This commit is contained in:
eric_G 2024-09-03 13:34:41 +02:00 committed by GitHub
commit d64f05aa6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 67 additions and 138 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
*~
*.sw[op]
.DS_Store

View file

@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th
Targeting web developers, Koel embraces some of the more modern web technologies to do its job.
**Shipped version:** 7.0.10~ynh1
**Shipped version:** 7.0.12~ynh1
**Demo:** <https://demo.koel.dev>

View file

@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th
Targeting web developers, Koel embraces some of the more modern web technologies to do its job.
**Versión actual:** 7.0.10~ynh1
**Versión actual:** 7.0.12~ynh1
**Demo:** <https://demo.koel.dev>

View file

@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th
Targeting web developers, Koel embraces some of the more modern web technologies to do its job.
**Paketatutako bertsioa:** 7.0.10~ynh1
**Paketatutako bertsioa:** 7.0.12~ynh1
**Demoa:** <https://demo.koel.dev>

View file

@ -21,7 +21,7 @@ Un simple service web de streaming audio personnel, écrit en Vue pour le client
Destiné aux développeurs web, Koel utilise certaines des technologies web les plus modernes pour accomplir son travail.
**Version incluse:** 7.0.10~ynh1
**Version incluse:** 7.0.12~ynh1
**Démo:** <https://demo.koel.dev>

View file

@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th
Targeting web developers, Koel embraces some of the more modern web technologies to do its job.
**Versión proporcionada:** 7.0.10~ynh1
**Versión proporcionada:** 7.0.12~ynh1
**Demo:** <https://demo.koel.dev>

View file

@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th
Targeting web developers, Koel embraces some of the more modern web technologies to do its job.
**Versi terkirim:** 7.0.10~ynh1
**Versi terkirim:** 7.0.12~ynh1
**Demo:** <https://demo.koel.dev>

View file

@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th
Targeting web developers, Koel embraces some of the more modern web technologies to do its job.
**Поставляемая версия:** 7.0.10~ynh1
**Поставляемая версия:** 7.0.12~ynh1
**Демо-версия:** <https://demo.koel.dev>

View file

@ -21,7 +21,7 @@ Koel is a simple web-based personal audio streaming service written in Vue on th
Targeting web developers, Koel embraces some of the more modern web technologies to do its job.
**分发版本:** 7.0.10~ynh1
**分发版本:** 7.0.12~ynh1
**演示:** <https://demo.koel.dev>

View file

@ -1,5 +0,0 @@
; Additional php.ini defines, specific to this pool of workers.
php_admin_value[upload_max_filesize] = 50M
php_admin_value[post_max_size] = 50M
php_admin_value[memory_limit] = 512M

View file

@ -16,7 +16,7 @@ location ^~ __PATH__/ {
location ~* \.php$ {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock;
fastcgi_index index.php;
include fastcgi_params;

View file

@ -7,7 +7,7 @@ name = "Koel"
description.en = "Simple web-based personal audio streaming service"
description.fr = "Simple service web de streaming audio personnel"
version = "7.0.10~ynh1"
version = "7.0.12~ynh1"
maintainers = ["tituspijean"]
@ -21,7 +21,8 @@ cpe = "cpe:2.3:a:koel:koel"
fund = "https://opencollective.com/koel"
[integration]
yunohost = ">= 11.1.21"
yunohost = ">= 11.2.29"
helpers_version = "2.1"
architectures = "all"
multi_instance = true
ldap = false
@ -43,8 +44,8 @@ ram.runtime = "50M"
[resources.sources]
[resources.sources.main]
url = "https://github.com/koel/koel/releases/download/v7.0.10/koel-v7.0.10.tar.gz"
sha256 = "8c3fe63ed0d416a94f456050ccc622be9a94b7d85f585b444d0317201fafc767"
url = "https://github.com/koel/koel/releases/download/v7.0.12/koel-v7.0.12.tar.gz"
sha256 = "d56921b243954b4fcc0b03caa880e85179caf71ed1a0cdc5ef9893ddb2432bbd"
autoupdate.strategy = "latest_github_release"
autoupdate.asset = "^koel-v.*tar.gz$"
@ -53,6 +54,7 @@ ram.runtime = "50M"
allow_email = true
[resources.install_dir]
group = "www-data:r-x"
[resources.data_dir]

View file

@ -1,17 +1,5 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
#=================================================
# PERSONAL HELPERS
#=================================================
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
# COMMON VARIABLES AND CUSTOM HELPERS
#=================================================

View file

@ -1,49 +1,40 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
ynh_print_info "Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$install_dir"
ynh_backup "$install_dir"
#=================================================
# BACKUP THE DATA DIR
#=================================================
ynh_backup --src_path="$data_dir" --is_big
ynh_backup "$data_dir"
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf"
#=================================================
# BACKUP THE MYSQL DATABASE
#=================================================
ynh_print_info --message="Backing up the MySQL database..."
ynh_print_info "Backing up the MySQL database..."
ynh_mysql_dump_db --database="$db_name" > db.sql
ynh_mysql_dump_db > db.sql
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."

View file

@ -1,25 +1,17 @@
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
ynh_script_progression "Updating NGINX web server configuration..."
ynh_change_url_nginx_config
ynh_config_change_url_nginx
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last
ynh_script_progression "Change of URL completed for $app"

View file

@ -1,64 +1,55 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
ynh_app_setting_set --key=php_memory_limit --value=512M
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=1
ynh_script_progression "Setting up source files..."
ynh_setup_source --dest_dir="$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================
ynh_script_progression --message="Initializing multimedia directories..." --weight=1
ynh_script_progression "Initializing multimedia directories..."
ynh_multimedia_build_main_dir
ynh_multimedia_addfolder --source_dir="$data_dir" --dest_dir="$app"
ynh_multimedia_addaccess $app
#=================================================
# APP INITIAL CONFIGURATION
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_script_progression "Adding $app's configuration..."
app_key=$(ynh_string_random --length=32)
ynh_app_setting_set --app="$app" --key="app_key" --value="$app_key"
ynh_add_config --template="env" --destination="$install_dir/.env"
ynh_app_setting_set --key="app_key" --value="$app_key"
ynh_config_add --template="env" --destination="$install_dir/.env"
#=================================================
# INITIALIZE THE APP
#=================================================
ynh_script_progression --message="Initializing $app..." --weight=1
ynh_script_progression "Initializing $app..."
pushd $install_dir
ynh_exec_as $app php$phpversion artisan koel:init --no-assets --no-interaction --quiet
ynh_exec_as_app php$php_version artisan koel:init --no-assets --no-interaction --quiet
popd
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
ynh_script_progression "Adding system configurations related to $app..."
ynh_add_fpm_config
ynh_config_add_phpfpm
ynh_add_nginx_config
ynh_config_add_nginx
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of $app completed" --last
ynh_script_progression "Installation of $app completed"

View file

@ -1,11 +1,5 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
@ -13,14 +7,14 @@ source /usr/share/yunohost/helpers
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
ynh_remove_nginx_config
ynh_config_remove_nginx
ynh_remove_fpm_config
ynh_config_remove_phpfpm
ynh_secure_remove --file="/home/yunohost.multimedia/$app"
ynh_safe_rm "/home/yunohost.multimedia/$app"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --last
ynh_script_progression "Removal of $app completed"

View file

@ -1,37 +1,28 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=1
ynh_script_progression "Restoring the app main directory..."
ynh_restore_file --origin_path="$install_dir"
chown -R $app:www-data "$install_dir"
ynh_restore "$install_dir"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Restoring the data directory..." --weight=1
ynh_script_progression "Restoring the data directory..."
ynh_restore_file --origin_path="$data_dir" --not_mandatory
ynh_restore "$data_dir"
chown -R $app:www-data "$data_dir"
#=================================================
# RESTORING MULTIMEDIA DIRECTORIES
#================================================
ynh_script_progression --message="Restoring multimedia directories..." --weight=1
ynh_script_progression "Restoring multimedia directories..."
ynh_multimedia_build_main_dir
ynh_multimedia_addfolder --source_dir="$data_dir" --dest_dir="$app"
@ -40,35 +31,32 @@ ynh_multimedia_addaccess $app
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
ynh_script_progression --message="Restoring the MySQL database..." --weight=1
ynh_script_progression "Restoring the MySQL database..."
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
ynh_mysql_db_shell < ./db.sql
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_script_progression "Restoring system configurations related to $app..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
#=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
ynh_script_progression "Reloading NGINX web server and $app's service..."
# Typically you only have either $app or php-fpm but not both at the same time...
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
ynh_systemctl --service=php$php_version-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload
ynh_systemctl --service=nginx --action=reload
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for $app" --last
ynh_script_progression "Restoration completed for $app"

View file

@ -1,37 +1,28 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...)
ynh_app_setting_set_default --key=php_memory_limit --value=512M
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..." --weight=1
ynh_script_progression "Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
ynh_script_progression "Upgrading system configurations related to $app..."
ynh_add_fpm_config
ynh_config_add_phpfpm
ynh_add_nginx_config
ynh_config_add_nginx
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of $app completed" --last
ynh_script_progression "Upgrade of $app completed"

View file

@ -1,2 +0,0 @@
*~
*.sw[op]

View file

@ -1,2 +0,0 @@
*~
*.sw[op]