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

Merge pull request #300 from YunoHost-Apps/fix-snappdf

Fix snappdf
This commit is contained in:
eric_G 2024-08-05 10:00:35 +02:00 committed by GitHub
commit c103d0179e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 30 additions and 51 deletions

View file

@ -19,7 +19,7 @@ It shall NOT be edited by hand.
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Shipped version:** 5.10.12~ynh2 **Shipped version:** 5.10.18~ynh1
**Demo:** <https://react.invoicing.co/demo> **Demo:** <https://react.invoicing.co/demo>

View file

@ -19,7 +19,7 @@ No se debe editar a mano.
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Versión actual:** 5.10.12~ynh2 **Versión actual:** 5.10.18~ynh1
**Demo:** <https://react.invoicing.co/demo> **Demo:** <https://react.invoicing.co/demo>

View file

@ -19,7 +19,7 @@ EZ editatu eskuz.
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Paketatutako bertsioa:** 5.10.12~ynh2 **Paketatutako bertsioa:** 5.10.18~ynh1
**Demoa:** <https://react.invoicing.co/demo> **Demoa:** <https://react.invoicing.co/demo>

View file

@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main.
Invoice Ninja est une plate-forme de facturation auto-hébergée permettant de créer et d'envoyer des factures par courrier électronique, de suivre les paiements et les dépenses, ainsi que de chronométrer les tâches et projets facturables pour les clients. Invoice Ninja est une plate-forme de facturation auto-hébergée permettant de créer et d'envoyer des factures par courrier électronique, de suivre les paiements et les dépenses, ainsi que de chronométrer les tâches et projets facturables pour les clients.
**Version incluse:** 5.10.12~ynh2 **Version incluse:** 5.10.18~ynh1
**Démo:** <https://react.invoicing.co/demo> **Démo:** <https://react.invoicing.co/demo>

View file

@ -19,7 +19,7 @@ NON debe editarse manualmente.
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Versión proporcionada:** 5.10.12~ynh2 **Versión proporcionada:** 5.10.18~ynh1
**Demo:** <https://react.invoicing.co/demo> **Demo:** <https://react.invoicing.co/demo>

View file

@ -19,7 +19,7 @@ Ini TIDAK boleh diedit dengan tangan.
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Versi terkirim:** 5.10.12~ynh2 **Versi terkirim:** 5.10.18~ynh1
**Demo:** <https://react.invoicing.co/demo> **Demo:** <https://react.invoicing.co/demo>

View file

@ -19,7 +19,7 @@
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**分发版本:** 5.10.12~ynh2 **分发版本:** 5.10.18~ynh1
**演示:** <https://react.invoicing.co/demo> **演示:** <https://react.invoicing.co/demo>

View file

@ -51,6 +51,7 @@ NINJA_ENVIRONMENT=selfhost
#options - snappdf / phantom / hosted_ninja #options - snappdf / phantom / hosted_ninja
PDF_GENERATOR=snappdf PDF_GENERATOR=snappdf
SNAPPDF_CHROMIUM_PATH=/usr/bin/chromium
PHANTOMJS_KEY='__PHANTOMJS_KEY__' PHANTOMJS_KEY='__PHANTOMJS_KEY__'
PHANTOMJS_SECRET=__APP_KEY__ PHANTOMJS_SECRET=__APP_KEY__

View file

@ -5,7 +5,7 @@ name = "InvoiceNinja 5"
description.en = "Create and email invoices, track payments, expenses, and time tasks" description.en = "Create and email invoices, track payments, expenses, and time tasks"
description.fr = "Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires" description.fr = "Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires"
version = "5.10.12~ynh2" version = "5.10.18~ynh1"
maintainers = ["Sebastian Gumprich"] maintainers = ["Sebastian Gumprich"]
@ -18,7 +18,7 @@ userdoc = "https://invoiceninja.github.io/"
code = "https://github.com/invoiceninja/invoiceninja" code = "https://github.com/invoiceninja/invoiceninja"
[integration] [integration]
yunohost = ">= 11.2" yunohost = ">= 11.2.20"
architectures = "all" architectures = "all"
multi_instance = true multi_instance = true
@ -58,8 +58,8 @@ ram.runtime = "50M"
[resources.sources] [resources.sources]
[resources.sources.main] [resources.sources.main]
url = "https://github.com/invoiceninja/invoiceninja/releases/download/v5.10.12/invoiceninja.tar" url = "https://github.com/invoiceninja/invoiceninja/releases/download/v5.10.18/invoiceninja.tar"
sha256 = "c6062fd860ae1a016c8453b313a8a3f5a717b0c6245a7493068d58eda7a541d8" sha256 = "2904126a058881af5072102b0456414030e733b6d52cab43d8ac9c6afa01d406"
format = "tar.gz" format = "tar.gz"
in_subdir = false in_subdir = false
autoupdate.strategy = "latest_github_release" autoupdate.strategy = "latest_github_release"
@ -71,9 +71,13 @@ ram.runtime = "50M"
[resources.permissions] [resources.permissions]
main.url = "/" main.url = "/"
api.url = "/api"
api.allowed = "visitors"
api.auth_header = false
api.show_tile = false
[resources.apt] [resources.apt]
packages = "mariadb-server, php8.3-bcmath, php8.3-gmp, php8.3-fileinfo, php8.3-gd, php8.3-mbstring, php8.3-pdo, php8.3-xml, php8.3-curl, php8.3-zip, php8.3-mysql, libnss3-dev, libatk1.0-0, libatk-bridge2.0-0, libxcomposite1, libxrandr2, libasound2, libcups2, libdrm2, libxkbcommon0, libxdamage1, libxfixes3, libgbm1, libpango-1.0-0, libcairo2" packages = "mariadb-server, php8.3-bcmath, php8.3-gmp, php8.3-fileinfo, php8.3-gd, php8.3-mbstring, php8.3-pdo, php8.3-xml, php8.3-curl, php8.3-zip, php8.3-mysql, libnss3-dev, libatk1.0-0, libatk-bridge2.0-0, libxcomposite1, libxrandr2, libasound2, libcups2, libdrm2, libxkbcommon0, libxdamage1, libxfixes3, libgbm1, libpango-1.0-0, libcairo2, chromium"
[resources.database] [resources.database]
type = "mysql" type = "mysql"

View file

@ -73,12 +73,6 @@ pushd "$install_dir"
php$phpversion artisan optimize --no-interaction --verbose php$phpversion artisan optimize --no-interaction --verbose
php$phpversion artisan view:clear php$phpversion artisan view:clear
php$phpversion artisan cache:clear php$phpversion artisan cache:clear
# install snappdf, since it isn't included by default anymore since
# 5.5.12: https://invoiceninja.github.io/docs/self-host-troubleshooting/#pdf-conversion-issues
php$phpversion vendor/bin/snappdf download
# see: https://forum.cloudron.io/topic/11932/invoice-ninja-server-500-internal-error/29
find vendor/beganovich/snappdf/versions/*-Linux_x64/chrome-linux/ -type f -name chrome* ! -name "*.*" -print -exec chmod 755 {} \;
popd popd
chmod 750 "$install_dir" chmod 750 "$install_dir"

View file

@ -9,23 +9,13 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env public/storage" ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env public/storage"
fi
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
@ -62,16 +52,12 @@ email="$(ynh_user_get_info --username=$admin --key=mail)"
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_script_progression --message="Updating a configuration file..." --weight=1
ynh_add_config --template="default.env" --destination="$install_dir/.env" ynh_add_config --template="default.env" --destination="$install_dir/.env"
chmod 600 "$install_dir/.env" chmod 600 "$install_dir/.env"
chown $app:$app "$install_dir/.env" chown $app:$app "$install_dir/.env"
fi
#================================================= #=================================================
# UPGRADE DATABASE # UPGRADE DATABASE
@ -81,11 +67,11 @@ ynh_script_progression --message="Upgrading the database..." --weight=1
pushd "$install_dir" pushd "$install_dir"
# Clear caches # Clear caches
# https://github.com/invoiceninja/invoiceninja/issues/7397 # https://github.com/invoiceninja/invoiceninja/issues/7397
ynh_secure_remove --file=$install_dir/bootstrap/cache/ #ynh_secure_remove --file=$install_dir/bootstrap/cache/
ynh_secure_remove --file=$install_dir/storage/framework/cache/ #ynh_secure_remove --file=$install_dir/storage/framework/cache/
ynh_secure_remove --file=$install_dir/storage/framework/sessions/ #ynh_secure_remove --file=$install_dir/storage/framework/sessions/
mkdir -p $install_dir/bootstrap/cache/ $install_dir/storage/framework/cache/ $install_dir/storage/framework/sessions/ #mkdir -p $install_dir/bootstrap/cache/ $install_dir/storage/framework/cache/ $install_dir/storage/framework/sessions/
# clear cached stuff under /app/data/storage/framework (https://github.com/laravel/framework/issues/17377) # clear cached stuff under /app/data/storage/framework (https://github.com/laravel/framework/issues/17377)
php$phpversion artisan view:clear php$phpversion artisan view:clear
@ -98,14 +84,8 @@ pushd "$install_dir"
php$phpversion artisan optimize --no-interaction --verbose php$phpversion artisan optimize --no-interaction --verbose
# clear cached stuff under /app/data/storage/framework (https://github.com/laravel/framework/issues/17377) # clear cached stuff under /app/data/storage/framework (https://github.com/laravel/framework/issues/17377)
php$phpversion artisan view:clear #php$phpversion artisan view:clear
php$phpversion artisan cache:clear #php$phpversion artisan cache:clear
# install snappdf, since it isn't included by default anymore since
# 5.5.12: https://invoiceninja.github.io/docs/self-host-troubleshooting/#pdf-conversion-issues
php$phpversion vendor/bin/snappdf download
# see: https://forum.cloudron.io/topic/11932/invoice-ninja-server-500-internal-error/29
find vendor/beganovich/snappdf/versions/*-Linux_x64/chrome-linux/ -type f -name chrome* ! -name "*.*" -print -exec chmod 755 {} \;
popd popd
chmod 750 "$install_dir" chmod 750 "$install_dir"