1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/streams_ynh.git synced 2024-09-03 20:26:20 +02:00

Merge pull request #35 from dragondaddy/extraconfig

Solution for custom config
This commit is contained in:
Papa Dragon 2024-05-10 02:30:32 +02:00 committed by GitHub
commit 1ccf7078a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 20 additions and 35 deletions

View file

@ -121,39 +121,6 @@ App::$config['system']['theme'] = 'fresh';
// Allow local test environments with unverified SSL certs using Lando
App::$config['system']['ssl_exceptions'] = 'lndo.site';
// Mail configuration
// By default, uses local sendmail service
// Only change these settings if you require SMTP transport
// App::$config['phpmailer']['mailer'] = 'smtp';
// App::$config['phpmailer']['host'] = 'example.com';
// Leave this line commented if using SSL or STARTTLS and set the port in the next sections
// App::$config['phpmailer']['port'] = 25; // (or 587 or 465 if using ssl)
// If using smtp authentication:
// App::$config['phpmailer']['smtpauth'] = 1;
// App::$config['phpmailer']['uername'] = 'your_username';
// App::$config['phpmailer']['password'] = 'your_secret_password';
// If using starttls:
// App::$config['phpmailer']['smtpsecure'] = 'tls';
// App::$config['phpmailer']['port'] = 587;
// If using ssl:
// App::$config['phpmailer']['smtpsecure'] = 'ssl';
// App::$config['phpmailer']['port'] = 465;
// If the server has a self-signed cert:
// App::$config['phpmailer']['noverify'] = 1;
// For debugging
// App::$config['phpmailer']['smtpdebug'] = 2; // valid values are 0-4
// These settings should work for 99% of use cases
// If you encounter any issues, please see https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
// If you need to extend these configuration options, please submit a pull request with your changes.
// PHP error logging setup
// Before doing this ensure that the webserver has permission
@ -166,3 +133,6 @@ ini_set('display_errors', '0');
error_reporting(E_ERROR | E_PARSE );
ini_set('error_log','php.log');
ini_set('log_errors','1');
// Extra settings stored in the app data dir (Service Classes, PHPMailer...)
include '__DATA_DIR__/extra_conf.php';

View file

@ -12,6 +12,10 @@
- **Failed Database after Upgrade**: If the database upgrade fails after version upgrade, you can visit the dedicated page, `https://mywebsite.domain.tld/admin/dbsync/`, and check the numbers of failed updates. These updates will have to be ran manually using software such as **phpMyAdmin**.
### Custom configuration
- **Additional settings in .htconfig.php**: If you need to add some additional lines in .htconfig.php (as described on the [Service Classes](https://codeberg.org/streams/streams/src/commit/c75afc9ab4b9ba19628008c14459756edf9c291a/doc/admin/en/Service_Classes.mc) or [PHPMailer](https://codeberg.org/streams/streams/src/commit/c75afc9ab4b9ba19628008c14459756edf9c291a/doc/admin/en/SMTP.mc) documentation), please add it in the `/home/yunohost.app/streams/extra_conf.php` file (or `/home/yunohost.app/streams__X/extra_conf.php` if you installed more than one site). Do not touch .htconfig.php as your changes will be wiped when the YunoHost package is upgraded.
### Git branches and code updates
- **Developer Mode**: the default git branch used is 'release', which should be considered as the stable version of the software. You can, **at your own risk**, switch to the 'dev' branch. You can do this in the config panel of your app in YunoHost admin interface. You can also do it through a SSH connection by using the `git checkout dev` command in the installation directory. **In the config panel you can only switch back to 'release' branch if it is ahead of the 'dev' branch**. You can do it anytime through SSH simply use the `git checkout release` command.

View file

@ -12,6 +12,10 @@
- **Échec de la base de données après la mise à niveau** : Parfois, la mise à niveau de la base de données échoue après la mise à niveau de la version. Allez sur la page dédiée de votre site, `https://monsite.domaine.tld/admin/dbsync/`, et vérifiez les références de mises à jour défaillantes. Ces mises à jour devront être exécutées manuellement, sur **phpMyAdmin**.
### Configuration personnalisée
- **Paramètres additionnels dans .htconfig.php** : Si vous avez besoin d'ajouter des lignes supplémentaires dans .htconfig.php (comme décrit dans la documentation de [Service Classes](https://codeberg.org/streams/streams/src/commit/c75afc9ab4b9ba19628008c14459756edf9c291a/doc/admin/en/Service_Classes.mc) ou de [PHPMailer](https://codeberg.org/streams/streams/src/commit/c75afc9ab4b9ba19628008c14459756edf9c291a/doc/admin/en/SMTP.mc)), veuillez les ajouter dans le fichier `/home/yunohost.app/streams/extra_conf.php` (ou `/home/yunohost.app/streams__X/extra_conf.php` si vous avez installé plusieurs sites). Ne touchez pas à .htconfig.php car vos modifications seront effacées lors de la mise à jour du paquet YunoHost.
### Branches git et mises à jour du code
- **Mode Développeur** : la branche utilisée par défaut est 'release', qui doit être considérée comme la version stable du logiciel. Vous pouvez, **à vos risques et périls**, basculer vers la branche de développement 'dev'. Vous pouvez le faire dans le panneau de configuration de votre application dans l'interface d'administration de YunoHost. Vous pouvez aussi le faire via une connexion SSH en utilisant la commande `git checkout dev` dans le répertoire d'installation. **Dans le panneau de configuration, vous ne pouvez revenir à la branche 'release' que si elle est en avance sur la branche 'dev'**. Vous pouvez le faire à tout moment via SSH en utilisant la commande `git checkout release`.

View file

@ -5,7 +5,7 @@ name = "Streams"
description.en = "Open source fediverse server"
description.fr = "Serveur fediverse open source"
version = "24.02.18~ynh3"
version = "24.05.10~ynh1"
maintainers = ["Papa Dragon"]

View file

@ -53,7 +53,7 @@ ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================
ynh_backup --src_path="/etc/cron.d/$app"
ynh_backup --src_path="/$data_dir"
ynh_backup --src_path="$data_dir"
#=================================================
# BACKUP THE DATABASE

View file

@ -122,6 +122,8 @@ ynh_store_file_checksum --file=$install_dir/.htconfig.php
chmod 600 "$install_dir/.htconfig.php"
chown $app:$app "$install_dir/.htconfig.php"
ynh_exec_as $app touch $data_dir/extra_conf.php
#=================================================
# SET CRON JOBS
#=================================================

View file

@ -148,6 +148,11 @@ ynh_add_config --template="../conf/htconfig.sample.php" --destination="$install_
chmod 600 "$install_dir/.htconfig.php"
chown $app:$app "$install_dir/.htconfig.php"
if [ ! -f $data_dir/extra_conf.php ]
then
ynh_exec_as $app touch $data_dir/extra_conf.php
fi
#=================================================
# UPGRADE CRON JOB
#=================================================