linuxserver / docker-bookstack

A Docker container for the BookStack documentation wiki
GNU General Public License v3.0
779 stars 109 forks source link

[FEAT] Add ability to configure queue worker process to support async action handling #186

Closed cdrfun closed 1 year ago

cdrfun commented 1 year ago

Is this a new feature request?

Wanted change

Running queue worker processes are required to support async action handling in Bookstack. Currently, there as no way to configure and run the queue worker process using this docker image. Bookstack documentation can be found here: https://www.bookstackapp.com/docs/admin/email-webhooks/#async-action-handling

Reason for change

As stated in the Bookstack documentation: Actions like sending email or triggering webhooks are performed synchronously by default which can slow down page loading when those actions are triggered. These actions can instead be processed asynchronously so they’re handled in the background to prevent slowing down the request. This requires a config change and a queue worker process to handle these background jobs:

Proposed code change

No response

thespad commented 1 year ago

Can you test lspipepr/bookstack:v23.08.1-pkg-abf62b2e-dev-7245559a0085b0d51594e140e1ec1bcae76aff08-pr-187 and see if it works for you? Just set QUEUE_CONNECTION=database as an environment variable and that should enable the queue.

cdrfun commented 1 year ago

Wow, super fast: It seems to work for me ps aux shows /usr/bin/php /app/www/artisan queue:work --sleep=3 --tries=1 --max-time=3600 after starting the container.

thespad commented 1 year ago

Thanks for checking. Once the PR has been reviewed within the team I'll get it merged.

ssddanbrown commented 1 year ago

Thank you for this @thespad! Pretty awesome to have this simply built into the container to make things easy for folks!