mirror of
https://github.com/YunoHost-Apps/castopod_ynh.git
synced 2024-09-03 18:16:14 +02:00
commit
63d6302883
9 changed files with 98 additions and 52 deletions
|
@ -1,14 +1,9 @@
|
||||||
# See here for more information
|
|
||||||
# https://github.com/YunoHost/package_check#syntax-check_process-file
|
|
||||||
|
|
||||||
# Move this file from check_process.default to check_process when you have filled it.
|
|
||||||
|
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
path="/path" (PATH)
|
path="/path"
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1
|
||||||
admin="john" (USER)
|
admin="john"
|
||||||
password="pass"
|
password="pass"
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
|
@ -19,7 +14,7 @@
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
#1.0.0 alpha.41
|
#1.0.0 alpha.41
|
||||||
upgrade=1 from_commit=596edabf2e972e3183cd6cff93f0e566f570f855
|
upgrade=1 from_commit=a43b9e3d66163252d1ea83a2924179ec777056f3
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
change_url=1
|
change_url=1
|
||||||
|
@ -27,6 +22,6 @@
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=596edabf2e972e3183cd6cff93f0e566f570f855
|
; commit=a43b9e3d66163252d1ea83a2924179ec777056f3
|
||||||
name=1.0.0 alpha.55
|
name=Merge pull request #24 from YunoHost-Apps/testing
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&
|
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&
|
||||||
|
|
|
@ -10,19 +10,28 @@
|
||||||
# - go to `/cp-install` to complete installation
|
# - go to `/cp-install` to complete installation
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
# Instance configuration
|
# Instance configuration
|
||||||
|
#--------------------------------------------------------------------
|
||||||
app.baseURL="https://__DOMAIN__"
|
app.baseURL="https://__DOMAIN__"
|
||||||
app.mediaBaseURL="https://__DOMAIN__"
|
app.mediaBaseURL="https://__DOMAIN__"
|
||||||
app.adminGateway="cp-admin"
|
app.adminGateway="cp-admin"
|
||||||
app.authGateway="cp-auth"
|
app.authGateway="cp-auth"
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
# Database configuration
|
# Database configuration
|
||||||
|
#--------------------------------------------------------------------
|
||||||
database.default.hostname="localhost"
|
database.default.hostname="localhost"
|
||||||
database.default.database="__DB_NAME__"
|
database.default.database="__DB_NAME__"
|
||||||
database.default.username="__DB_NAME__"
|
database.default.username="__DB_NAME__"
|
||||||
database.default.password="__DB_PWD__"
|
database.default.password="__DB_PWD__"
|
||||||
database.default.DBPrefix="cp_"
|
database.default.DBPrefix="cp_"
|
||||||
|
|
||||||
# Cache configuration (advanced)
|
#--------------------------------------------------------------------
|
||||||
# Keep as is if you don't know what this means
|
# Redis configuration
|
||||||
cache.handler="file"
|
#--------------------------------------------------------------------
|
||||||
|
cache.handler="redis"
|
||||||
|
cache.redis.host="127.0.0.1"
|
||||||
|
cache.redis.password=null
|
||||||
|
cache.redis.port=6379
|
||||||
|
cache.redis.database=__REDIS_NUMBER__
|
||||||
|
|
12
doc/DISCLAIMER.md
Normal file
12
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
* How to configure this app: Go to `domain.ltd/cp-admin` to connect to the administration panel.
|
||||||
|
|
||||||
|
#### Multi-user support
|
||||||
|
|
||||||
|
* Are LDAP and HTTP auth supported? **No**
|
||||||
|
* Can the app be used by multiple users? **Yes**
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
* :warning: Installation possible only on a root domain or subdomain.
|
|
@ -6,15 +6,23 @@
|
||||||
"en": "Hosting platform made for podcasters",
|
"en": "Hosting platform made for podcasters",
|
||||||
"fr": "Plateforme d'hébergement conçue pour les podcasteurs"
|
"fr": "Plateforme d'hébergement conçue pour les podcasteurs"
|
||||||
},
|
},
|
||||||
"version": "1.0.0-57~ynh1",
|
"version": "1.0.0-57~ynh2",
|
||||||
"url": "https://podlibre.org/",
|
"url": "https://podlibre.org/",
|
||||||
|
"upstream": {
|
||||||
|
"license": "GPL-3.0-only",
|
||||||
|
"website": "https://podlibre.org/",
|
||||||
|
"demo": "https://podcast.podlibre.org/@podlibre_fr",
|
||||||
|
"admindoc": "https://podlibre.org/create-a-podcast-in-3mn-with-castopod/",
|
||||||
|
"userdoc": "https://yunohost.org/apps",
|
||||||
|
"code": "https://code.podlibre.org/podlibre/castopod-host"
|
||||||
|
},
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "eric_G",
|
"name": "eric_G",
|
||||||
"email": ""
|
"email": ""
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.1.7"
|
"yunohost": ">= 4.2.4"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -8,6 +8,8 @@ YNH_PHP_VERSION="7.3"
|
||||||
|
|
||||||
extra_php_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysqlnd"
|
extra_php_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysqlnd"
|
||||||
|
|
||||||
|
pkg_dependencies="redis-server redis-tools"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -49,6 +49,21 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# CREATE DEDICATED USER
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring system user..." --weight=1
|
||||||
|
|
||||||
|
# Create a system user
|
||||||
|
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A MYSQL DATABASE
|
# CREATE A MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -59,14 +74,6 @@ db_user=$db_name
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE DEDICATED USER
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring system user..." --weight=1
|
|
||||||
|
|
||||||
# Create a system user
|
|
||||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -76,6 +83,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
|
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -100,7 +111,10 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring Castopod..." --weight=1
|
ynh_script_progression --message="Configuring Castopod..." --weight=1
|
||||||
|
|
||||||
|
redis_number=$(( $YNH_APP_INSTANCE_NUMBER - 1 ))
|
||||||
ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
|
ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
|
||||||
|
chmod 600 $final_path/.env
|
||||||
|
chown $app:www-data "$final_path/.env"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP A CRON
|
# SETUP A CRON
|
||||||
|
@ -109,16 +123,6 @@ ynh_script_progression --message="Setuping a cron..."
|
||||||
|
|
||||||
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC FINALIZATION
|
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Set permissions to app files
|
|
||||||
chown -R $app: $final_path
|
|
||||||
chmod 600 $final_path/.env
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP APPLICATION WITH CURL
|
# SETUP APPLICATION WITH CURL
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -29,6 +29,14 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=1
|
||||||
# Remove a database if it exists, along with the associated user
|
# Remove a database if it exists, along with the associated user
|
||||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
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
|
# REMOVE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -67,13 +67,9 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
#=================================================
|
chmod 750 "$final_path"
|
||||||
# RESTORE USER RIGHTS
|
chmod -R o-rwx "$final_path"
|
||||||
#=================================================
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
# Set permissions to app files
|
|
||||||
chown -R $app:$app $final_path
|
|
||||||
chmod 600 $final_path/.env
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
|
@ -81,6 +77,14 @@ chmod 600 $final_path/.env
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REINSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||||
|
|
||||||
|
# Define and install dependencies
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE MYSQL DATABASE
|
# RESTORE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -88,6 +88,10 @@ then
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -96,6 +100,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPGRADE DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -109,7 +120,10 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring Castopod..." --weight=1
|
ynh_script_progression --message="Configuring Castopod..." --weight=1
|
||||||
|
|
||||||
|
redis_number=$(( $YNH_APP_INSTANCE_NUMBER - 1 ))
|
||||||
ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
|
ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
|
||||||
|
chmod 600 $final_path/.env
|
||||||
|
chown $app:www-data "$final_path/.env"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP CRON
|
# SETUP CRON
|
||||||
|
@ -118,16 +132,6 @@ ynh_script_progression --message="Setuping cron..."
|
||||||
|
|
||||||
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC FINALIZATION
|
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Set permissions to app files
|
|
||||||
chown -R $app: $final_path
|
|
||||||
chmod 600 $final_path/.env
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue