@klemmi you can create a hook (/etc/pacman.d/hooks/bookstack.hook) to do that automatically. This is mine:
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = bookstack
[Action]
Description = Update BookStack installation
When = PostTransaction
# https://www.bookstackapp.com/docs/admin/updates/
Exec = /usr/bin/runuser -u http -- /bin/bash -c "/usr/bin/php /usr/share/webapps/bookstack/artisan migrate --force && /usr/bin/php /usr/share/webapps/bookstack/artisan cache:clear && /usr/bin/php /usr/share/webapps/bookstack/artisan config:clear && /usr/bin/php /usr/share/webapps/bookstack/artisan view:clear"
Pinned Comments
C0rn3j commented on 2024-01-16 14:24 (UTC) (edited on 2024-02-02 14:36 (UTC) by C0rn3j)
If someone has free time, please add the information below and more to https://wiki.archlinux.org/title/BookStack
One can take inspiration from https://wiki.archlinux.org/title/Nextcloud for the style, as Nextcloud is also a PHP app.
See https://www.bookstackapp.com/docs/admin/updates/#version-specific-instructions for breaking changes between versions.
Updates might require intervention, this can be automated via a pacman hook.
/etc/pacman.d/hooks/bookstack.hook
If using php-fpm (or legacy), one needs to add an override for the upload folder:
/etc/systemd/system/php-fpm.service.d/override.conf