mirror of
https://github.com/YunoHost-Apps/cachet_ynh.git
synced 2024-09-03 18:16:03 +02:00
commit
27e012dbef
13 changed files with 92 additions and 72 deletions
21
README.md
21
README.md
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
|||
|
||||
# Cachet for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/cachet)  
|
||||
[](https://dash.yunohost.org/appci/app/cachet)  
|
||||
[](https://install-app.yunohost.org/?app=cachet)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
@ -18,13 +18,13 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
[Cachet](https://cachethq.io/) is a free, open source status page for your API, service or company. Built with all of the features that you'd expect from a status page, Cachet comes with a powerful API, a metric system, multiple user support, two factor authentication for added security and is easy to get setup. A powerful, self-hosted alternative to StatusPage.io and Status.io.
|
||||
|
||||
|
||||
**Shipped version:** 2.4.0~ynh4
|
||||
**Shipped version:** 2.4.0~ynh5
|
||||
|
||||
**Demo:** https://demo.cachethq.io
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||

|
||||
|
||||
## Disclaimers / important information
|
||||
|
||||
|
@ -39,21 +39,22 @@ Totally configurable through the Cachet application dashboard.
|
|||
|
||||
## Documentation and resources
|
||||
|
||||
* Official app website: https://cachethq.io
|
||||
* Official admin documentation: https://docs.cachethq.io
|
||||
* Upstream app code repository: https://github.com/CachetHQ/Cachet
|
||||
* YunoHost documentation for this app: https://yunohost.org/app_cachet
|
||||
* Report a bug: https://github.com/YunoHost-Apps/cachet_ynh/issues
|
||||
* Official app website: <https://cachethq.io>
|
||||
* Official admin documentation: <https://docs.cachethq.io>
|
||||
* Upstream app code repository: <https://github.com/CachetHQ/Cachet>
|
||||
* YunoHost documentation for this app: <https://yunohost.org/app_cachet>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/cachet_ynh/issues>
|
||||
|
||||
## Developer info
|
||||
|
||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/cachet_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
```
|
||||
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/cachet_ynh/tree/testing --debug
|
||||
or
|
||||
sudo yunohost app upgrade cachet -u https://github.com/YunoHost-Apps/cachet_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
||||
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>
|
||||
|
|
27
README_fr.md
27
README_fr.md
|
@ -1,10 +1,14 @@
|
|||
<!--
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
# Cachet pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/cachet)  
|
||||
[](https://dash.yunohost.org/appci/app/cachet)  
|
||||
[](https://install-app.yunohost.org/?app=cachet)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *Ce package vous permet d'installer Cachet rapidement et simplement sur un serveur YunoHost.
|
||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||
|
@ -14,13 +18,13 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
|||
[Cachet](https://cachethq.io/) is a free, open source status page for your API, service or company. Built with all of the features that you'd expect from a status page, Cachet comes with a powerful API, a metric system, multiple user support, two factor authentication for added security and is easy to get setup. A powerful, self-hosted alternative to StatusPage.io and Status.io.
|
||||
|
||||
|
||||
**Version incluse :** 2.4.0~ynh4
|
||||
**Version incluse :** 2.4.0~ynh5
|
||||
|
||||
**Démo :** https://demo.cachethq.io
|
||||
|
||||
## Captures d'écran
|
||||
|
||||

|
||||

|
||||
|
||||
## Avertissements / informations importantes
|
||||
|
||||
|
@ -35,21 +39,22 @@ Totally configurable through the Cachet application dashboard.
|
|||
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l'app : https://cachethq.io
|
||||
* Documentation officielle de l'admin : https://docs.cachethq.io
|
||||
* Dépôt de code officiel de l'app : https://github.com/CachetHQ/Cachet
|
||||
* Documentation YunoHost pour cette app : https://yunohost.org/app_cachet
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/cachet_ynh/issues
|
||||
* Site officiel de l'app : <https://cachethq.io>
|
||||
* Documentation officielle de l'admin : <https://docs.cachethq.io>
|
||||
* Dépôt de code officiel de l'app : <https://github.com/CachetHQ/Cachet>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_cachet>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/cachet_ynh/issues>
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/cachet_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
```
|
||||
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/cachet_ynh/tree/testing --debug
|
||||
ou
|
||||
sudo yunohost app upgrade cachet -u https://github.com/YunoHost-Apps/cachet_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
||||
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
# 2.3.15~ynh1
|
||||
upgrade=1 from_commit=7497ea8b6915b725358db0d4a1210f999961cfee
|
||||
# 2.4.0~ynh3
|
||||
upgrade=1 from_commit=1a0fd240d86ffaf5bcee61c176a22a7d075688a6
|
||||
upgrade=1 from_commit=1a0fd240d86ffaf5bcee61c176a22a7d075688a6
|
||||
# 2.4.0~ynh4
|
||||
upgrade=1 from_commit=6fcddf81286fb845735978ed832c9273c3b783ce
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=0
|
||||
|
@ -24,7 +24,3 @@
|
|||
;;; Options
|
||||
Email=
|
||||
Notification=none
|
||||
;;; Upgrade options
|
||||
; commit=7497ea8b6915b725358db0d4a1210f999961cfee
|
||||
name=Update dependencies for buster
|
||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&admin_password=secret&language=en&is_public=1&
|
||||
|
|
|
@ -23,7 +23,7 @@ CACHET_EMOJI=false
|
|||
CACHET_AUTO_TWITTER=true
|
||||
|
||||
MAIL_DRIVER=sendmail
|
||||
MAIL_HOST=
|
||||
MAIL_HOST=localhost
|
||||
MAIL_PORT=25
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
SOURCE_URL=https://github.com/CachetHQ/Cachet/archive/c7ad51e87645e5a717fb817616424276a8e5345b.tar.gz
|
||||
SOURCE_SUM=7897744356bf81a2bcbc734f132eb5daafa889611c9c72fb2501afb3e9007cac
|
||||
SOURCE_URL=https://github.com/CachetHQ/Cachet/archive/cf86f65f1dabf283d001d0f5d380f26dd5cfb64c.tar.gz
|
||||
SOURCE_SUM=be48fdeacc093c9e688ecd9cef61e0304a856fcd6281066552bfecd8355fa35e
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=
|
||||
SOURCE_EXTRACT=true
|
||||
|
|
|
@ -4,20 +4,19 @@ location __PATH__/ {
|
|||
# Path to source
|
||||
alias __FINALPATH__/public/ ;
|
||||
|
||||
index index.php;
|
||||
|
||||
more_set_headers "Strict-Transport-Security: max-age=15768000";
|
||||
|
||||
index index.php;
|
||||
location __PATH__ {
|
||||
try_files $uri __PATH__/index.php;
|
||||
}
|
||||
|
||||
try_files $uri __PATH__/index.php;
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_keep_conn on;
|
||||
more_set_headers "Strict-Transport-Security: max-age=15768000";
|
||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_keep_conn on;
|
||||
more_set_headers "Strict-Transport-Security: max-age=15768000";
|
||||
}
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Open source status page system",
|
||||
"fr": "Système de page de statut open source"
|
||||
},
|
||||
"version": "2.4.0~ynh4",
|
||||
"version": "2.4.0~ynh5",
|
||||
"url": "https://cachethq.io",
|
||||
"upstream": {
|
||||
"license": "BSD-3-Clause",
|
||||
|
@ -30,7 +30,7 @@
|
|||
"mysql"
|
||||
],
|
||||
"arguments": {
|
||||
"install" : [
|
||||
"install": [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain"
|
||||
|
@ -49,7 +49,7 @@
|
|||
},
|
||||
"choices": ["fr", "en"],
|
||||
"default": "en"
|
||||
},
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
extra_php_dependencies="php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-sqlite3"
|
||||
pkg_dependencies="php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-sqlite3"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -14,6 +14,10 @@ source /usr/share/yunohost/helpers
|
|||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
true
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -101,14 +101,22 @@ fi
|
|||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||
|
||||
ynh_backup_if_checksum_is_different --file="$final_path/.env"
|
||||
ynh_backup_if_checksum_is_different --file="$final_path/bootstrap/cachet/production.php"
|
||||
|
||||
ynh_script_progression --message="Updating Cachet configuration..." --weight=1
|
||||
# Replace domain in Cachet configuration files
|
||||
ynh_replace_string --match_string="$old_domain" --replace_string="$new_domain" --target_file="$final_path/.env"
|
||||
ynh_replace_string --match_string="$old_domain" --replace_string="$new_domain" --target_file="$final_path/bootstrap/cachet/production.php"
|
||||
|
||||
ynh_store_file_checksum --file="$final_path/.env"
|
||||
ynh_store_file_checksum --file="$final_path/bootstrap/cachet/production.php"
|
||||
|
||||
# Replace domain in Cachet database settings
|
||||
ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_user" <<< "UPDATE settings SET value = 'https://$new_domain' WHERE name = 'app_domain'"
|
||||
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" <<< "UPDATE settings SET value = 'https://$new_domain' WHERE name = 'app_domain'"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
|
|
|
@ -57,6 +57,13 @@ ynh_app_setting_set --app=$app --key=password --value=$password
|
|||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..."
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -102,7 +109,7 @@ ynh_add_nginx_config
|
|||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=8
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
|
|
|
@ -71,19 +71,23 @@ chmod -R o-rwx "$final_path"
|
|||
chown -R $app:www-data "$final_path"
|
||||
chown -R $app: "${final_path}/.env" "${final_path}/storage/" "${final_path}/bootstrap/"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..."
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=6
|
||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
|
||||
|
||||
# Restore the file first, so it can have a backup if different
|
||||
ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf"
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
# Recreate a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -71,7 +71,7 @@ fi
|
|||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -80,21 +80,9 @@ ynh_system_user_create --username=$app
|
|||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
# Backup essential configuration files
|
||||
tmpdir=$(mktemp -d)
|
||||
mv $final_path/.env $tmpdir
|
||||
mv $final_path/bootstrap/cachet/production.php $tmpdir
|
||||
|
||||
# Remove every old application files
|
||||
ynh_secure_remove --file="$final_path" # /bootstrap/cache/*
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
# Restore configuration files
|
||||
mv $tmpdir/.env $final_path
|
||||
mv $tmpdir/production.php $final_path/bootstrap/cachet/
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
ynh_setup_source --dest_dir="$final_path" --keep=".env bootstrap/cachet/production.php"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
@ -110,13 +98,20 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..."
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
|
|
Loading…
Add table
Reference in a new issue