1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flarum_ynh.git synced 2024-09-03 18:36:24 +02:00

Appease the v2 linter

This commit is contained in:
tituspijean 2023-02-21 22:18:59 +01:00
parent b2d670dfce
commit 691b1ba9d6
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
8 changed files with 30 additions and 39 deletions

View file

@ -1,14 +1,7 @@
### Installing
- The installation requires at least 1GB of free memory. A swap file of this size will be created if needed.
- You can select the default language (among English `en` by default, French `fr`, and German `de`). Other languages can be added after installation like any other extension.
### Using
After installation, simply open your browser to Flarum's page. First loading may be a bit longer as assets are generated.
## Login
This app allows your YunoHost users to log in with a [dedicated LDAP extension](https://github.com/tituspijean/flarum-ext-auth-ldap). By default, the standard logging method is hidden.
To allow non-YunoHost users to log in, the LDAP extension setting is in the admin panel.
To allow non-YunoHost users to log in, tune the LDAP extension setting in Flarum's admin panel.
### Upgrading
@ -18,14 +11,14 @@ Note that, for the moment, all third-party extensions are removed upon upgrading
Flarum does not offer to install extensions from its admin panel yet, so you need to use the command line.
Replace `flarum` with your app ID in case of multiple installations.
Replace `flarum` with your app ID (__APP__) in case of multiple installations.
Replace `vendor/extension` with the appropriate names. Read the extension documentation if it requires additional steps.
```bash
sudo su
app=flarum
cd /var/www/$app
sudo -u $app php7.4 composer.phar require vendor/extension
sudo -u $app php__PHPVERSION__ composer.phar require vendor/extension
```
#### Troubleshooting
@ -33,13 +26,13 @@ sudo -u $app php7.4 composer.phar require vendor/extension
##### `Timeout` errors
Some users have reported a successful installation, but get a blank page due to a `timeout` on a PHP script that prepares the forum assests (`Minify.php`, notably).
In `/etc/php/*php_version*/fpm/pool.d/*app_id*.conf`, you can increase the `max_execution_time` and `max_input_time` limits (both values are in seconds if nothing is specified).
In `/etc/php/__PHPVERSION__/fpm/pool.d/__APP__.conf`, you can increase the `max_execution_time` and `max_input_time` limits (both values are in seconds if nothing is specified).
Reload PHP-FPM with `sudo service php*php_version*-fpm reload`.
Reload PHP-FPM with `sudo service php__PHPVERSION__-fpm reload`.
##### Upload limit
If you are facing an error while uploading large files into the forum, PHP may be limiting file upload.
In `/etc/php/*php_version*/fpm/pool.d/*app_id*.conf`, you can uncomment (remove `;` at the beginning of the line) and increase the values of `upload_max_filesize` and `post_max_size` (both values are in bytes).
In `/etc/php/__PHPVERSION__/fpm/pool.d/__APP__.conf`, you can uncomment (remove `;` at the beginning of the line) and increase the values of `upload_max_filesize` and `post_max_size` (both values are in bytes).
Reload PHP-FPM with `sudo service php*php_version*-fpm reload`.
Reload PHP-FPM with `sudo service php__PHP_VERSION__-fpm reload`.

View file

@ -1,11 +1,4 @@
### Installation
- L'installation nécessite au moins 1 Go de mémoire vive libre. Un fichier *swap* de cette taille sera créé si nécessaire.
- Vous pouvez sélectionner la langue par défaut dans les paramètres d'installation (parmi l'anglais `en`, le français `fr` et l'allemand `de`). Les autres langues sont installables comme n'importe quelle autre extension.
### Utilisation
Après l'installation, ouvrez simplement votre navigateur à la page de Flarum. Le premier chargement peut être un peu retardé par la génération du cache.
### Connexion
Cette app permet à vos utilisateurs enregistrés dans YunoHost de se connecter avec une [extension LDAP dédiée](https://github.com/tituspijean/flarum-ext-auth-ldap). Par défaut, la méthode de connexion standard est cachée.
Pour permettre à des utilisateurs non-YunoHost de se connecter, référez-vous au menu de configuration de l'extension LDAP dans le panneau d'administration de Flarum.
@ -19,14 +12,13 @@ Leurs données et paramètres restent dans la base de donnée de Flarum, seule u
Flarum ne permet pas encore d'installer des extensions depuis son interface d'administration ; vous devrez donc utiliser la ligne de commande.
Remplacez `flarum` par l'ID de votre app en cas de multiple installations.
Remplacez `vendor/extension` par les noms adéquats. Référez-vous à la documentation de l'extension pour vérifier qu'elle ne nécessite pas de configuration supplémentaire.
```bash
sudo su
app=flarum
app=__APP__
cd /var/www/$app
sudo -u $app php7.4 composer.phar require vendor/extension
sudo -u $app php__PHPVERSION__ composer.phar require vendor/extension
```
#### Dépannage
@ -34,13 +26,13 @@ sudo -u $app php7.4 composer.phar require vendor/extension
##### Erreurs de `timeout`
Quelques utilisateurs rapportent qu'ils font fassent à une page blanche due à une erreur de `timeout` dans un script PHP qui prépare le cache (`Minify.php`, notamment).
Dans `/etc/php/*php_version*/fpm/pool.d/*app_id*.conf`, vous pouvez augmenter les limites `max_execution_time` et `max_input_time` (les deux valeurs sont en secondes si vous ne précisez pas d'unité).
Dans `/etc/php/__PHPVERSION__/fpm/pool.d/__APP__.conf`, vous pouvez augmenter les limites `max_execution_time` et `max_input_time` (les deux valeurs sont en secondes si vous ne précisez pas d'unité).
Rechargez PHP-FPM avec `sudo service php*php_version*-fpm reload`.
Rechargez PHP-FPM avec `sudo service php__PHPVERSION__-fpm reload`.
##### Limite de téléversement
Si vous avez une erreur lors du chargement de gros fichiers dans le forum, PHP pourrait être en train de limiter les téléversements.
Dans `/etc/php/*php_version*/fpm/pool.d/*app_id*.conf`, vous pouvez décommenter (enlevez `;` au début de la ligne) et augmenter les valeurs de `upload_max_filesize` de `post_max_size` (les deux valeurs sont en octets).
Dans `/etc/php/__PHPVERSION__/fpm/pool.d/__APP__.conf`, vous pouvez décommenter (enlevez `;` au début de la ligne) et augmenter les valeurs de `upload_max_filesize` de `post_max_size` (les deux valeurs sont en octets).
Rechargez PHP-FPM avec `sudo service php*php_version*-fpm reload`.
Rechargez PHP-FPM avec `sudo service php__PHPVERSION__-fpm reload`.

View file

@ -0,0 +1,3 @@
You can now open your browser to Flarum's page.
First loading may be a bit longer, as assets are generated.

View file

@ -0,0 +1,3 @@
Vous pouvez maintenant ouvrir votre navigateur à la page de Flarum.
Le premier chargement peut être un peu retardé par la génération du cache.

View file

@ -0,0 +1,2 @@
- The installation requires at least 1GB of free memory. A swap file of this size will be created if needed.
- You can select the default language (among English `en` by default, French `fr`, and German `de`). Other languages can be added after installation like any other extension.

View file

@ -0,0 +1,2 @@
- L'installation nécessite au moins 1 Go de mémoire vive libre. Un fichier *swap* de cette taille sera créé si nécessaire.
- Vous pouvez sélectionner la langue par défaut dans les paramètres d'installation (parmi l'anglais `en`, le français `fr` et l'allemand `de`). Les autres langues sont installables comme n'importe quelle autre extension.

View file

@ -30,10 +30,6 @@ ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement.
ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
[install]
[install.swap]
ask.en = "The installation will add a 1 GB swap file if your system has less than 1 GB free RAM."
ask.fr = "L'installation ajoutera un fichier swap de 1 Go si votre système a moins de 1 Go de RAM libre."
type = "alert"
[install.domain]
# this is a generic question - ask strings are automatically handled by Yunohost's core

View file

@ -27,7 +27,7 @@ app=$YNH_APP_INSTANCE_NAME
ynh_script_progression --message="Loading installation settings..." --weight=1
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
#=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
@ -100,15 +100,15 @@ fi
#=================================================
if [ $new_path = "/" ]; then
if [ $old_path = "/" ]; then
ynh_replace_string "://$old_domain" "://$new_domain" "$final_path/config.php"
ynh_replace_string "://$old_domain" "://$new_domain" "$install_dir/config.php"
else
ynh_replace_string "://$old_domain$old_path" "://$new_domain" "$final_path/config.php"
ynh_replace_string "://$old_domain$old_path" "://$new_domain" "$install_dir/config.php"
fi
else
if [ $old_path = "/" ]; then
ynh_replace_string "://$old_domain" "://$new_domain$new_path" "$final_path/config.php"
ynh_replace_string "://$old_domain" "://$new_domain$new_path" "$install_dir/config.php"
else
ynh_replace_string "://$old_domain$old_path" "://$new_domain$new_path" "$final_path/config.php"
ynh_replace_string "://$old_domain$old_path" "://$new_domain$new_path" "$install_dir/config.php"
fi
fi