mirror of
https://github.com/YunoHost-Apps/castopod_ynh.git
synced 2024-09-03 18:16:14 +02:00
commit
596edabf2e
12 changed files with 105 additions and 29 deletions
13
README.md
13
README.md
|
@ -11,11 +11,11 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
## Overview
|
||||
Castopod Server is an open-source hosting platform made for podcasters who want engage and interact with their audience. Please note that Castopod is still under heavy development: it may not be 100% stable and some features are still being developed.
|
||||
|
||||
**Shipped version:** 1.0.0 alpha.41
|
||||
**Shipped version:** 1.0.0 alpha.55
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||

|
||||
|
||||
## Demo
|
||||
|
||||
|
@ -23,8 +23,7 @@ Castopod Server is an open-source hosting platform made for podcasters who want
|
|||
|
||||
## Configuration
|
||||
|
||||
* Go to `domain.ltd/cp-install` to creat an admin user.
|
||||
* How to configure this app: From an admin panel `domain.ltd/cp-admin`.
|
||||
* How to configure this app: Go to `domain.ltd/cp-admin` to connect to the administration panel.
|
||||
|
||||
## Documentation
|
||||
|
||||
|
@ -40,8 +39,8 @@ Castopod Server is an open-source hosting platform made for podcasters who want
|
|||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/castopod/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/castopod/)
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/castopod/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/castopod/)
|
||||
|
||||
## Limitations
|
||||
|
||||
|
@ -55,7 +54,7 @@ Castopod Server is an open-source hosting platform made for podcasters who want
|
|||
|
||||
* Report a bug: https://github.com/YunoHost-Apps/castopod_ynh/issues
|
||||
* App website: https://podlibre.org/
|
||||
* Upstream app repository: https://code.podlibre.org/podlibre/castopod
|
||||
* Upstream app repository: https://code.podlibre.org/podlibre/castopod-host
|
||||
* YunoHost website: https://yunohost.org/
|
||||
|
||||
---
|
||||
|
|
13
README_fr.md
13
README_fr.md
|
@ -11,11 +11,11 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
|
|||
## Vue d'ensemble
|
||||
Castopod Server est une plate-forme d'hébergement open source conçue pour les podcasteurs qui souhaitent s'engager et interagir avec leur public. Veuillez noter que Castopod est toujours en développement: il n'est peut-être pas stable à 100% et certaines fonctionnalités sont encore en développement.
|
||||
|
||||
**Version incluse :** 1.0.0 alpha.41
|
||||
**Version incluse :** 1.0.0 alpha.55
|
||||
|
||||
## Captures d'écran
|
||||
|
||||

|
||||

|
||||
|
||||
## Démo
|
||||
|
||||
|
@ -23,8 +23,7 @@ Castopod Server est une plate-forme d'hébergement open source conçue pour les
|
|||
|
||||
## Configuration
|
||||
|
||||
* Allez dans `domain.ltd/cp-install` pour créer un utilisateur administrateur.
|
||||
* Comment configurer cette application : via le panneau d'administration `domain.ltd/cp-admin`.
|
||||
* Comment configurer cette application : via `domain.ltd/cp-admin` pour avoir accès à la page d'administration.
|
||||
|
||||
## Documentation
|
||||
|
||||
|
@ -40,8 +39,8 @@ Castopod Server est une plate-forme d'hébergement open source conçue pour les
|
|||
|
||||
#### Architectures supportées
|
||||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/castopod/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/castopod/)
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/castopod/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/castopod/)
|
||||
|
||||
## Limitations
|
||||
|
||||
|
@ -55,7 +54,7 @@ Castopod Server est une plate-forme d'hébergement open source conçue pour les
|
|||
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/castopod_ynh/issues
|
||||
* Site de l'application : https://podlibre.org/
|
||||
* Dépôt de l'application principale : https://code.podlibre.org/podlibre/castopod
|
||||
* Dépôt de l'application principale : https://code.podlibre.org/podlibre/castopod-host
|
||||
* Site web YunoHost : https://yunohost.org/
|
||||
|
||||
---
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
;; Test complet
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/cp-install" (PATH)
|
||||
path="/path" (PATH)
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
admin="john" (USER)
|
||||
password="pass"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=0
|
||||
|
@ -16,8 +18,8 @@
|
|||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
#1.0.0 alpha.40
|
||||
upgrade=1 from_commit=ac00b520875beed49bb138e795562e1f74700ab9
|
||||
#1.0.0 alpha.41
|
||||
upgrade=1 from_commit=9c603f6b659e4191028cc909311a0cbde9955155
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
change_url=1
|
||||
|
@ -25,6 +27,6 @@
|
|||
Email=
|
||||
Notification=none
|
||||
;;; Upgrade options
|
||||
; commit=ac00b520875beed49bb138e795562e1f74700ab9
|
||||
name=1.0.0 alpha.40
|
||||
manifest_arg=domain=DOMAIN&path=PATH&is_public=1&
|
||||
; commit=9c603f6b659e4191028cc909311a0cbde9955155
|
||||
name=1.0.0 alpha.41
|
||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://code.podlibre.org/podlibre/castopod/uploads/f73810f885b378fcbbe1dd9d715e40ac/castopod-1.0.0-alpha.41.zip
|
||||
SOURCE_SUM=18ef5b60f8cdf151c1bcaf27c8d0e74d8c10751541f51f32b9e004d596709c59
|
||||
SOURCE_URL=https://code.podlibre.org/podlibre/castopod-host/uploads/d2a79e2d52dea0525cd2f9c37299580f/castopod-host-1.0.0-alpha.55.zip
|
||||
SOURCE_SUM=ae75de08209ed7b4ce3b24967ef716a27881bcaff8e19e780dab45dce4d789d6
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
1
conf/cron
Normal file
1
conf/cron
Normal file
|
@ -0,0 +1 @@
|
|||
* * * * * __USER__ /usr/bin/php__PHPVERSION__ __FINALPATH__/public/index.php scheduled-activities
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Hosting platform made for podcasters",
|
||||
"fr": "Plateforme d'hébergement conçue pour les podcasteurs"
|
||||
},
|
||||
"version": "1.0.0-41~ynh1",
|
||||
"version": "1.0.0-55~ynh1",
|
||||
"url": "https://podlibre.org/",
|
||||
"license": "GPL-3.0-only",
|
||||
"maintainer": {
|
||||
|
@ -33,6 +33,11 @@
|
|||
},
|
||||
"example": "podcast.example.com"
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
"example": "johndoe"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
|
@ -41,6 +46,11 @@
|
|||
"fr": "Si cette case est cochée, Castopod sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
|
||||
},
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "password",
|
||||
"type": "password",
|
||||
"example": "Choose a password"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
extra_php_dependencies="php${YNH_PHP_VERSION}-mysql 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"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -45,6 +45,12 @@ ynh_backup --src_path="$final_path"
|
|||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -23,6 +23,9 @@ ynh_abort_if_errors
|
|||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url="/"
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
password=$YNH_APP_ARG_PASSWORD
|
||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -44,6 +47,7 @@ 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=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
|
@ -98,6 +102,34 @@ ynh_script_progression --message="Configuring Castopod..." --weight=1
|
|||
|
||||
ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
|
||||
|
||||
#=================================================
|
||||
# SETUP A CRON
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setuping a cron..."
|
||||
|
||||
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# SETUP APPLICATION WITH CURL
|
||||
#=================================================
|
||||
|
||||
# Set the app as temporarily public for curl call
|
||||
ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
||||
# Making the app public for curl
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
|
||||
# Reload NGINX
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
# Installation with curl
|
||||
ynh_script_progression --message="Finalizing installation..." --weight=1
|
||||
|
||||
ynh_local_curl "/cp-install"
|
||||
|
||||
ynh_local_curl "/cp-install/create-superadmin" "email=$email" "username=$admin" "password=$password"
|
||||
|
||||
ynh_permission_update --permission="main" --remove="visitors"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
@ -105,8 +137,7 @@ ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env
|
|||
#=================================================
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:$app $final_path
|
||||
#chmod o-rwx $final_path
|
||||
chown -R $app: $final_path
|
||||
chmod 600 $final_path/.env
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -53,6 +53,13 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
|
|||
# Remove the dedicated PHP-FPM config
|
||||
ynh_remove_fpm_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
# Remove a cron file
|
||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -73,7 +73,6 @@ ynh_restore_file --origin_path="$final_path"
|
|||
|
||||
# Set permissions to app files
|
||||
chown -R $app:$app $final_path
|
||||
#chmod o-rwx $final_path
|
||||
chmod 600 $final_path/.env
|
||||
|
||||
#=================================================
|
||||
|
@ -91,6 +90,12 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
|||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# RESTORE VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -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)
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -81,6 +82,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
ynh_secure_remove --file="$final_path/app"
|
||||
ynh_secure_remove --file="$final_path/public/assets"
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
fi
|
||||
|
@ -101,6 +104,20 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
|||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE CASTOPOD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring Castopod..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
|
||||
|
||||
#=================================================
|
||||
# SETUP CRON
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setuping cron..."
|
||||
|
||||
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
@ -108,8 +125,7 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
|
|||
#=================================================
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:$app $final_path
|
||||
#chmod o-rwx $final_path
|
||||
chown -R $app: $final_path
|
||||
chmod 600 $final_path/.env
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue