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

Merge pull request #163 from YunoHost-Apps/testing

Testing : v0.11.2 + php 7.4
This commit is contained in:
lapineige 2022-02-04 15:49:02 +01:00 committed by GitHub
commit 2123495b52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 41 additions and 34 deletions

View file

@ -24,7 +24,7 @@ In addition to taking over the functionality of Instagram, the functioning of Pi
It is also possible to import your data from Instagram. It is also possible to import your data from Instagram.
**Shipped version:** 0.11.1~ynh2 **Shipped version:** 0.11.2~ynh1
@ -44,15 +44,15 @@ After being first registered, you need to execute the folloing command to promot
**Run:** **Run:**
$ (cd /var/www/pixelfed && php7.3 artisan user:admin 1) $ sudo php7.4 /var/www/pixelfed/artisan user:admin 1
and respond yes to the question ` Add admin privileges to this user?` and respond yes to the question ` Add admin privileges to this user?`.
### Allow/Close registrations ### Allow/Close registrations
Registrations are open by default. Registrations are open by default.
To change that setting, edit `/var/www/pixelfed/.env` and set `OPEN_REGISTRATION=false` instead of `true`. To change that setting, edit `/var/www/pixelfed/.env` and set `OPEN_REGISTRATION=false` instead of `true`.
Then run `php7.3 artisan config:cache` to reload the settings. Then run `php7.4 artisan config:cache` to reload the settings.
### Disable search engine indexing ### Disable search engine indexing

View file

@ -21,7 +21,7 @@ En plus de reprendre les fonctionnalités d'Instagram, le fonctionnement de Pixe
Il est également possible d'importer ses données depuis Instagram. Il est également possible d'importer ses données depuis Instagram.
**Version incluse :** 0.11.1~ynh2 **Version incluse :** 0.11.2~ynh1
@ -39,9 +39,9 @@ Il est également possible d'importer ses données depuis Instagram.
Après avoir été enregistré pour la première fois, vous devez exécuter la commande suivante pour promouvoir le premier enregistré en tant qu'administrateur Après avoir été enregistré pour la première fois, vous devez exécuter la commande suivante pour promouvoir le premier enregistré en tant qu'administrateur
**Courir:** **Entrez la commande:**
$ (cd /var/www/pixelfed && php7.3 artisan user:admin 1) $ php7.4 /var/www/pixelfed/artisan user:admin 1
et répondez oui à la question « Ajouter des privilèges d'administrateur à cet utilisateur ? » et répondez oui à la question « Ajouter des privilèges d'administrateur à cet utilisateur ? »
@ -49,7 +49,7 @@ et répondez oui à la question « Ajouter des privilèges d'administrateur à c
Les inscriptions sont ouvertes par défaut. Les inscriptions sont ouvertes par défaut.
Pour modifier ce paramètre, modifiez `/var/www/pixelfed/.env` et définissez `OPEN_REGISTRATION=false` au lieu de `true`. Pour modifier ce paramètre, modifiez `/var/www/pixelfed/.env` et définissez `OPEN_REGISTRATION=false` au lieu de `true`.
Ensuite, exécutez `php7.3 artisan config:cache` pour recharger les paramètres. Ensuite, exécutez `php7.4 artisan config:cache` pour recharger les paramètres.
### Désactiver l'indexation des moteurs de recherche ### Désactiver l'indexation des moteurs de recherche

View file

@ -32,6 +32,8 @@
upgrade=1 from_commit=c7181d1c7cb6cba53bb65e622c78b0309a53b76a upgrade=1 from_commit=c7181d1c7cb6cba53bb65e622c78b0309a53b76a
# 0.11.0~ynh2 # 0.11.0~ynh2
upgrade=1 from_commit=d85b0b112afd19313dbf4cfba954e255789dfb88 upgrade=1 from_commit=d85b0b112afd19313dbf4cfba954e255789dfb88
# 0.11.1~ynh2
upgrade=1 from_commit=f8ecb9a95fe6430fb9d93ca674e4f0d475ecd332
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
port_already_use=0 port_already_use=0
@ -58,3 +60,5 @@ Notification=all
name=0.11.0~ynh1 name=0.11.0~ynh1
; commit=d85b0b112afd19313dbf4cfba954e255789dfb88 ; commit=d85b0b112afd19313dbf4cfba954e255789dfb88
name=0.11.0~ynh2 name=0.11.0~ynh2
; commit=f8ecb9a95fe6430fb9d93ca674e4f0d475ecd332
name=0.11.1~ynh2

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/pixelfed/pixelfed/archive/v0.11.1.tar.gz SOURCE_URL=https://github.com/pixelfed/pixelfed/archive/v0.11.2.tar.gz
SOURCE_SUM=132dfceac3c0ea27dd54198d145d2d84f1714b4aa333c8b6f5141d259a77e9cb SOURCE_SUM=04eca99fa8a725ae97cf01ad8c8b26b28f02a2b579dcff9320a172433afe0de2
OURCE_SUM_PRG=sha256sum OURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -8,15 +8,15 @@ After being first registered, you need to execute the folloing command to promot
**Run:** **Run:**
$ (cd /var/www/pixelfed && php7.3 artisan user:admin 1) $ sudo php7.4 /var/www/pixelfed/artisan user:admin 1
and respond yes to the question ` Add admin privileges to this user?` and respond yes to the question ` Add admin privileges to this user?`.
### Allow/Close registrations ### Allow/Close registrations
Registrations are open by default. Registrations are open by default.
To change that setting, edit `/var/www/pixelfed/.env` and set `OPEN_REGISTRATION=false` instead of `true`. To change that setting, edit `/var/www/pixelfed/.env` and set `OPEN_REGISTRATION=false` instead of `true`.
Then run `php7.3 artisan config:cache` to reload the settings. Then run `php7.4 artisan config:cache` to reload the settings.
### Disable search engine indexing ### Disable search engine indexing

View file

@ -6,9 +6,9 @@
Après avoir été enregistré pour la première fois, vous devez exécuter la commande suivante pour promouvoir le premier enregistré en tant qu'administrateur Après avoir été enregistré pour la première fois, vous devez exécuter la commande suivante pour promouvoir le premier enregistré en tant qu'administrateur
**Courir:** **Entrez la commande:**
$ (cd /var/www/pixelfed && php7.3 artisan user:admin 1) $ php7.4 /var/www/pixelfed/artisan user:admin 1
et répondez oui à la question « Ajouter des privilèges d'administrateur à cet utilisateur ? » et répondez oui à la question « Ajouter des privilèges d'administrateur à cet utilisateur ? »
@ -16,7 +16,7 @@ et répondez oui à la question « Ajouter des privilèges d'administrateur à c
Les inscriptions sont ouvertes par défaut. Les inscriptions sont ouvertes par défaut.
Pour modifier ce paramètre, modifiez `/var/www/pixelfed/.env` et définissez `OPEN_REGISTRATION=false` au lieu de `true`. Pour modifier ce paramètre, modifiez `/var/www/pixelfed/.env` et définissez `OPEN_REGISTRATION=false` au lieu de `true`.
Ensuite, exécutez `php7.3 artisan config:cache` pour recharger les paramètres. Ensuite, exécutez `php7.4 artisan config:cache` pour recharger les paramètres.
### Désactiver l'indexation des moteurs de recherche ### Désactiver l'indexation des moteurs de recherche

View file

@ -6,7 +6,7 @@
"en": "ActivityPub Federated Image Sharing", "en": "ActivityPub Federated Image Sharing",
"fr": "Logiciel de partage d'image fédéré via ActivityPub" "fr": "Logiciel de partage d'image fédéré via ActivityPub"
}, },
"version": "0.11.1~ynh2", "version": "0.11.2~ynh1",
"url": "https://pixelfed.org/", "url": "https://pixelfed.org/",
"upstream": { "upstream": {
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",

View file

@ -4,11 +4,13 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
YNH_PHP_VERSION="7.3" YNH_PHP_VERSION="7.4"
YNH_COMPOSER_VERSION="2.1.5" YNH_COMPOSER_VERSION="2.1.5"
pkg_dependencies="postgresql libgd3 jpegoptim optipng pngquant ffmpeg imagemagick supervisor php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-ctype php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-exif php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-iconv php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-tokenizer php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-pdo php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-imagick" pkg_dependencies="postgresql libgd3 jpegoptim optipng pngquant ffmpeg imagemagick supervisor"
extra_php_dependencies="php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-ctype php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-exif php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-iconv php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-tokenizer php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-pdo php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-imagick"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -89,7 +89,7 @@ ynh_app_config_validate() {
ynh_app_config_apply() { ynh_app_config_apply() {
_ynh_app_config_apply _ynh_app_config_apply
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies"
} }
ynh_app_config_run $1 ynh_app_config_run $1

View file

@ -115,7 +115,7 @@ ynh_add_nginx_config
ynh_script_progression --message="Configuring PHP-FPM..." ynh_script_progression --message="Configuring PHP-FPM..."
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================

View file

@ -74,16 +74,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
#================================================= #=================================================
# SPECIFIC RESTORATION # SPECIFIC RESTORATION
#================================================= #=================================================
@ -94,6 +84,17 @@ ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies # Define and install dependencies
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# RESTORE THE POSTGRESQL DATABASE # RESTORE THE POSTGRESQL DATABASE
#================================================= #=================================================

View file

@ -25,7 +25,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
app_key=$(ynh_app_setting_get --app=$app --key=app_key) app_key=$(ynh_app_setting_get --app=$app --key=app_key)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) redis_db=$(ynh_app_setting_get --app=$app --key=redis_db)
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
@ -186,7 +185,8 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_script_progression --message="Upgrading PHP-FPM configuration..." ynh_script_progression --message="Upgrading PHP-FPM configuration..."
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# SPECIFIC UPGRADE # SPECIFIC UPGRADE
@ -195,7 +195,7 @@ ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_
#================================================= #=================================================
ynh_script_progression --message="Updating composer dependencies..." ynh_script_progression --message="Updating composer dependencies..."
ynh_exec_warn_less ynh_composer_exec --phpversion="$phpversion" --workdir="$final_path" --commands="update" ynh_exec_warn_less ynh_composer_exec --workdir="$final_path" --commands="update"
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE