mirror of
https://github.com/YunoHost-Apps/pixelfed_ynh.git
synced 2024-09-03 20:06:04 +02:00
commit
941a388579
12 changed files with 56 additions and 56 deletions
|
@ -9,7 +9,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
|
|||
## Overview
|
||||
The federated image sharing service Pixelfed, for YunoHost
|
||||
|
||||
**Shipped version:** 0.9.6
|
||||
**Shipped version:** 0.10.0
|
||||
|
||||
## Important points to read before installing
|
||||
|
||||
|
@ -27,7 +27,7 @@ After being first registered, you need to execute the folloing command to promot
|
|||
|
||||
**Run:**
|
||||
|
||||
$ (cd /var/www/pixelfed && php7.2 artisan user:admin 1)
|
||||
$ (cd /var/www/pixelfed && php7.3 artisan user:admin 1)
|
||||
|
||||
and respond yes to the question ` Add admin privileges to this user?`
|
||||
|
||||
|
@ -35,12 +35,12 @@ and respond yes to the question ` Add admin privileges to this user?`
|
|||
|
||||
Registrations are open by default.
|
||||
To change that setting, edit `/var/www/pixelfed/.env` and set `OPEN_REGISTRATION=false` instead of `true`.
|
||||
Then run `php7.2 artisan config:cache` to reload the settings.
|
||||
Then run `php7.3 artisan config:cache` to reload the settings.
|
||||
|
||||
### Pixelfed php commands and php version
|
||||
|
||||
Pixelfed might require some command line instructions if you want to make manual changes to your configuration.
|
||||
By default php 7.0 is currently used when you type `php`. You need to use `php7.2 [command]` instead.
|
||||
By default php 7.0 is currently used when you type `php`. You need to use `php7.3 [command]` instead.
|
||||
Those commands can be found in the official documentation.
|
||||
|
||||
## Documentation
|
||||
|
@ -67,7 +67,6 @@ Those commands can be found in the official documentation.
|
|||
Developers info
|
||||
----------------
|
||||
|
||||
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
|
||||
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/pixelfed_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/pixelfed/pixelfed/archive/v0.9.6.tar.gz
|
||||
SOURCE_SUM=a9234dcafb86322764892be6b325494a840d6a9f4f6f2dbaaa695b466a02ac22
|
||||
SOURCE_URL=https://github.com/pixelfed/pixelfed/archive/v0.10.0.tar.gz
|
||||
SOURCE_SUM=213c896e30f8df2ad5b8ea0cfb8f3904d0ba0d97a37e6a2c242d454e74c00f8f
|
||||
OURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -7,7 +7,7 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
ExecStart=/usr/bin/php7.2 __FINALPATH__/artisan horizon
|
||||
ExecStart=/usr/bin/php7.3 __FINALPATH__/artisan horizon
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
|
|
|
@ -16,7 +16,7 @@ location __PATH__/ {
|
|||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php/php7.2-fpm-__NAME__.sock;
|
||||
fastcgi_pass unix:/var/run/php/php7.3-fpm-__NAME__.sock;
|
||||
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
|
|
|
@ -33,7 +33,7 @@ group = __USER__
|
|||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
listen = /var/run/php/php7.2-fpm-__NAMETOCHANGE__.sock
|
||||
listen = /var/run/php/php7.3-fpm-__NAMETOCHANGE__.sock
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "ActivityPub Federated Image Sharing",
|
||||
"fr": "Logiciel de partage d'image fédéré via ActivityPub"
|
||||
},
|
||||
"version": "0.9.6~ynh1",
|
||||
"version": "0.10.0~ynh1",
|
||||
"url": "https://pixelfed.org/",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"maintainer": [
|
||||
|
|
|
@ -9,7 +9,7 @@ pkg_dependencies="postgresql redis-server \
|
|||
libfreetype6 libjpeg62-turbo libpng16-16 libxpm4 libvpx4 libmagickwand-6.q16-3 libwebp6 \
|
||||
pngquant jpegoptim gifsicle"
|
||||
|
||||
extra_pkg_dependencies="php7.2-bcmath php7.2-cli php7.2-curl php7.2-exif php7.2-gd php7.2-intl php7.2-json php7.2-mbstring php7.2-pgsql php7.2-simplexml php7.2-xml php7.2-zip"
|
||||
extra_pkg_dependencies="php7.3-bcmath php7.3-cli php7.3-curl php7.3-exif php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-pgsql php7.3-simplexml php7.3-xml php7.3-zip"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
@ -68,7 +68,7 @@ ynh_install_composer () {
|
|||
# Install another version of php.
|
||||
#
|
||||
# usage: ynh_install_php --phpversion=phpversion [--package=packages]
|
||||
# | arg: -v, --phpversion - Version of php to install. Can be one of 7.1, 7.2 or 7.3
|
||||
# | arg: -v, --phpversion - Version of php to install. Can be one of 7.1, 7.3 or 7.3
|
||||
# | arg: -p, --package - Additionnal php packages to install
|
||||
ynh_install_php () {
|
||||
# Declare an array to define the options of this helper.
|
||||
|
|
|
@ -56,7 +56,7 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
#=================================================
|
||||
ynh_print_info --message="Backing up php-fpm configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/php/7.2/fpm/pool.d/$app.conf"
|
||||
ynh_backup --src_path="/etc/php/7.3/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE POSTGRESQL DATABASE
|
||||
|
|
|
@ -88,11 +88,11 @@ ynh_store_file_checksum --file="$config"
|
|||
#=================================================
|
||||
|
||||
pushd "$final_path"
|
||||
php7.2 artisan config:clear
|
||||
php7.2 artisan config:cache
|
||||
php7.2 artisan route:clear
|
||||
php7.2 artisan route:cache
|
||||
php7.2 artisan horizon:purge
|
||||
php7.3 artisan config:clear
|
||||
php7.3 artisan config:cache
|
||||
php7.3 artisan route:clear
|
||||
php7.3 artisan route:cache
|
||||
php7.3 artisan horizon:purge
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -62,7 +62,7 @@ ynh_install_app_dependencies "$pkg_dependencies"
|
|||
#=================================================
|
||||
ynh_print_info --message="Installing php..."
|
||||
|
||||
ynh_install_php --phpversion="7.2" --package="$extra_pkg_dependencies"
|
||||
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
|
||||
|
||||
#=================================================
|
||||
# CREATE A POSTGRESQL DATABASE
|
||||
|
@ -71,11 +71,11 @@ ynh_print_info --message="Creating a PostgreSQL database..."
|
|||
|
||||
ynh_psql_test_if_first_run
|
||||
|
||||
db_name=$(ynh_sanitize_dbid "$app")
|
||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
db_user=$db_name
|
||||
db_pwd=$(ynh_string_random)
|
||||
db_pwd=$(ynh_string_random --length=32)
|
||||
ynh_app_setting_set --app="$app" --key=db_name --value="$db_name"
|
||||
ynh_app_setting_set --app="$app" --key=db_pwd --value="$db_pwd"
|
||||
ynh_app_setting_set --app="$app" --key=db_pwd --value="$db_pwd"
|
||||
|
||||
# Initialize database and store postgres password for upgrade
|
||||
ynh_psql_setup_db --db_user="$db_user" --db_name="$db_name" --db_pwd="$db_pwd"
|
||||
|
@ -110,7 +110,7 @@ ynh_system_user_create --username="$app"
|
|||
ynh_print_info --message="Configuring php-fpm..."
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
ynh_add_fpm_config --phpversion="7.2"
|
||||
ynh_add_fpm_config --phpversion="7.3"
|
||||
|
||||
#=================================================
|
||||
# INSTALL PHP DEPENDENCIES
|
||||
|
@ -118,12 +118,12 @@ ynh_add_fpm_config --phpversion="7.2"
|
|||
|
||||
chown -R "$app": "$final_path"
|
||||
|
||||
ynh_install_composer --phpversion="7.2" --workdir="$final_path"
|
||||
ynh_install_composer --phpversion="7.3" --workdir="$final_path"
|
||||
|
||||
# Fix Google Recaptcha removal
|
||||
ynh_secure_remove --file="$final_path/bootstrap/cache"
|
||||
mkdir -p "$final_path/bootstrap/cache"
|
||||
ynh_composer_exec --phpversion="7.2" --workdir="$final_path" --commands="dump-autoload"
|
||||
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="dump-autoload"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
|
@ -162,17 +162,17 @@ ynh_store_file_checksum --file="$config"
|
|||
#=================================================
|
||||
|
||||
pushd "$final_path"
|
||||
php7.2 artisan -n key:generate --force
|
||||
php7.2 artisan horizon:install
|
||||
php7.2 artisan config:clear
|
||||
php7.2 artisan config:cache
|
||||
php7.2 artisan route:cache
|
||||
php7.2 artisan view:cache
|
||||
php7.2 artisan storage:link
|
||||
php7.2 artisan migrate --force
|
||||
php7.2 artisan update
|
||||
php7.2 artisan horizon:purge
|
||||
php7.2 artisan horizon:assets
|
||||
php7.3 artisan -n key:generate --force
|
||||
php7.3 artisan horizon:install
|
||||
php7.3 artisan config:clear
|
||||
php7.3 artisan config:cache
|
||||
php7.3 artisan route:cache
|
||||
php7.3 artisan view:cache
|
||||
php7.3 artisan storage:link
|
||||
php7.3 artisan migrate --force
|
||||
php7.3 artisan update
|
||||
php7.3 artisan horizon:purge
|
||||
php7.3 artisan horizon:assets
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -76,13 +76,13 @@ chown -R "$app": "$final_path"
|
|||
#=================================================
|
||||
ynh_print_info --message="Installing php..."
|
||||
|
||||
ynh_install_php --phpversion="7.2" --package="$extra_pkg_dependencies"
|
||||
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/7.2/fpm/pool.d/$app.conf"
|
||||
ynh_restore_file --origin_path="/etc/php/7.3/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
@ -131,7 +131,7 @@ ynh_systemd_action --service_name="${app}-horizon" --action="start" --log_path=s
|
|||
#=================================================
|
||||
ynh_print_info --message="Reloading nginx web server and php-fpm..."
|
||||
|
||||
ynh_systemd_action --service_name=php7.2-fpm --action=reload
|
||||
ynh_systemd_action --service_name=php7.3-fpm --action=reload
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -124,7 +124,8 @@ ynh_install_app_dependencies "$pkg_dependencies"
|
|||
#=================================================
|
||||
ynh_print_info --message="Upgrading php..."
|
||||
|
||||
ynh_install_php --phpversion="7.2" --package="$extra_pkg_dependencies"
|
||||
ynh_remove_php
|
||||
ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies"
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
|
@ -140,7 +141,7 @@ ynh_system_user_create --username="$app"
|
|||
ynh_print_info --message="Upgrading php-fpm configuration..."
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
ynh_add_fpm_config --phpversion="7.2"
|
||||
ynh_add_fpm_config --phpversion="7.3"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
|
@ -153,9 +154,9 @@ chown -R "$app": "$final_path"
|
|||
# Fix Google Recaptcha removal
|
||||
ynh_secure_remove --file="$final_path/bootstrap/cache"
|
||||
mkdir -p "$final_path/bootstrap/cache"
|
||||
ynh_composer_exec --phpversion="7.2" --workdir="$final_path" --commands="dump-autoload"
|
||||
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="dump-autoload"
|
||||
|
||||
ynh_composer_exec --phpversion="7.2" --workdir="$final_path" --commands="update"
|
||||
ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="update"
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
|
@ -181,18 +182,18 @@ ynh_store_file_checksum --file="$config"
|
|||
#=================================================
|
||||
|
||||
pushd "$final_path"
|
||||
php7.2 artisan horizon:install
|
||||
php7.2 artisan config:clear
|
||||
php7.2 artisan config:cache
|
||||
php7.2 artisan route:clear
|
||||
php7.2 artisan route:cache
|
||||
php7.2 artisan view:clear
|
||||
php7.2 artisan view:cache
|
||||
php7.2 artisan storage:link
|
||||
php7.2 artisan migrate --force
|
||||
php7.2 artisan update
|
||||
php7.2 artisan horizon:purge
|
||||
php7.2 artisan horizon:assets
|
||||
php7.3 artisan horizon:install
|
||||
php7.3 artisan config:clear
|
||||
php7.3 artisan config:cache
|
||||
php7.3 artisan route:clear
|
||||
php7.3 artisan route:cache
|
||||
php7.3 artisan view:clear
|
||||
php7.3 artisan view:cache
|
||||
php7.3 artisan storage:link
|
||||
php7.3 artisan migrate --force
|
||||
php7.3 artisan update
|
||||
php7.3 artisan horizon:purge
|
||||
php7.3 artisan horizon:assets
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue