]> BookStack Code Mirror - website/commitdiff
Continued v21.12 post, Added webhooks & queues to docs
authorDan Brown <redacted>
Tue, 21 Dec 2021 20:47:43 +0000 (20:47 +0000)
committerDan Brown <redacted>
Tue, 21 Dec 2021 20:47:43 +0000 (20:47 +0000)
content/blog/bookstack-release-v21-12.md
content/docs/admin/email-config.md [deleted file]
content/docs/admin/email-webhooks.md [new file with mode: 0644]
static/images/2021/12/audit_log_search.png [new file with mode: 0644]
static/images/2021/12/copy_book.png [new file with mode: 0644]
static/images/2021/12/copy_role.png [new file with mode: 0644]
static/images/2021/12/webhook_form.png [new file with mode: 0644]
static/images/2021/12/webhooks_list.png [new file with mode: 0644]
themes/bookstack/layouts/partials/menu_admin_docs.html

index 89738986f784cb53750564a4fd43c7fa9a2274a2..7f8d6ae2f385d27d96fbcfd94ee6fa42afed832f 100644 (file)
@@ -29,12 +29,12 @@ BookStack can now emit webhooks! These are web requests that are emitted by Book
 when someone performs an action in the system (Updates page, Creates book etc..).
 Webhooks can be found by an administrator in the application settings.
 
-!! Image of webhooks list
+![Webhook list in settings](/images/2021/12/webhooks_list.png)
 
 Webhooks can be triggered by any event that's tracked in the audit log. You can choose
 specific events to trigger your webhooks or you can trigger upon any event.
 
-!! Image of webhook create view
+![Webhook from view](/images/2021/12/webhook_form.png)
 
 When triggered, BookStack will send a HTTP POST JSON request to the provided endpoint
 with a common set of details regarding the event. The general data format is shown when creating
@@ -87,9 +87,7 @@ The possibilities are pretty endless.
 
 Since webhooks need to make external HTTP requests, they have potential to slow down a system.
 If you're introducing webhooks that'd be triggered we have a way to run these in the background to
-prevent user experience slowdowns. Details about this can be found in the docs here.
-
-!! TODO - Update above with link
+prevent user experience slowdowns. [Details about this can be found here](/docs/admin/email-webhooks/#async-action-handling).
 
 ### Copy Entire Chapters & Books
 
@@ -98,7 +96,7 @@ copy entire chapters or even books. Performing this action will also copy all ch
 and/or pages in a single smooth action. Copy views will now show warnings to confirm
 copy behavior within BookStack so the necessary considerations can be made.
 
-!! IMAGE OF COPY VIEW
+![Book copy view](/images/2021/12/copy_book.png)
 
 These new abilities bring some great potential new workflow advancements, such as being
 able to create "templated" books pre-configured with the right chapter & page structure
@@ -109,7 +107,18 @@ ready to be copied out.
 When creating or updating a role there are a lot of permissions to configure.
 Creating a set of similar roles could be a time consuming experience. 
 As of v21.12 there's now a "Copy" action when viewing an existing role which
-will take you to the role create view with all fields filled as per the copied role:
+will take you to the role create view with all fields filled as per the copied role.
+
+![Role copy button](/images/2021/12/copy_role.png)
+
+### Audit Log IP Address Search
+
+The audit log has received another update thanks to [@johnroyer](https://github.com/BookStackApp/BookStack/pull/3081).
+It's now possible to search the audit log by IP address. 
+The search is a prefix-match so you can search using just the starting 
+portion if needing to search a range.
+
+![IP address search in audit log](/images/2021/12/audit_log_search.png)
 
 ### Search API Updates
 
@@ -140,7 +149,7 @@ run on command line via `php artisan bookstack:<command>`.
 I recently produced a getting started guide for the local theme system which includes
 registering custom commands:
 
-<iframe width="560" height="315" src="https://www.youtube.com/embed/YVbpm_35crQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+<iframe width="100%" height="360" src="https://www.youtube.com/embed/YVbpm_35crQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
 
 ### Translations
@@ -153,7 +162,12 @@ content up-to-date. The below are the great contributions since v21.11:
 
 **Released in v21.12**
 
-
+* Added webhooks. ([#147](https://github.com/BookStackApp/BookStack/pull/147), [#3099](https://github.com/BookStackApp/BookStack/pull/3099))
+* Added ability to copy books, chapters & roles. ([#3118](https://github.com/BookStackApp/BookStack/pull/3118), [#1123](https://github.com/BookStackApp/BookStack/issues/1123))
+* Added audit log IP address search. Thanks to [@johnroyer](https://github.com/BookStackApp/BookStack/pull/3081). ([#3081](https://github.com/BookStackApp/BookStack/pull/3081))
+* Updated translations with latest Crowdin changes. ([#3117](https://github.com/BookStackApp/BookStack/pull/3117))
+* Fixed issue where non-ascii content could break search result previews. Thanks to [@Kristian-Krastev](https://github.com/BookStackApp/BookStack/pull/3113). ([#3113](https://github.com/BookStackApp/BookStack/pull/3113))
+* Fixed mismatched password validation rules across the application. ([#2237](https://github.com/BookStackApp/BookStack/issues/2237))
 
 **Released in v21.11.1 through v21.11.3**
 
diff --git a/content/docs/admin/email-config.md b/content/docs/admin/email-config.md
deleted file mode 100644 (file)
index fb13432..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-+++
-title = "Email Configuration"
-description = "Configuring BookStack to send email"
-date = "2020-03-14"
-type = "admin-doc"
-slug = "email-config"
-+++
-
-BookStack sends out emails for a range of purposes such as email-address confirmation & "forgot password" flows.
-The following mechanisms for sending mail are supported:
-
-1. SMTP
-3. Sendmail (Linux sendmail)
-
-## SMTP
-
-To get up and running with SMTP you will need to add, or set, the following variables in your `.env` file:
-
-```bash
-MAIL_DRIVER=smtp
-
-# Host, Port & Encryption mechanism to use
-MAIL_HOST=smtp.provider.tld
-MAIL_PORT=465
-MAIL_ENCRYPTION=tls
-
-# Authentication details for your SMTP service
-MAIL_USERNAME=user@provider.tld
-MAIL_PASSWORD=onlyifneeded
-
-# The "from" email address for outgoing email
-MAIL_FROM=noreply@yourdomain.tld  
-
-# The "from" name used for outgoing email
-MAIL_FROM_NAME=BookStack
-```
-
-## Sendmail
-
-The `sendmail` drivers uses the sendmail application on the host system. It will call `/usr/sbin/sendmail -bs`.
-
-To enable this option you can set the following in your `.env` file:
-
-```bash
-MAIL_DRIVER=sendmail
-
-# The "from" email address for outgoing email
-MAIL_FROM=noreply@yourdomain.tld  
-
-# The "from" name used for outgoing email
-MAIL_FROM_NAME=BookStack
-```
-
-## Debugging
-
-You can follow the instructions provided in the [debugging documentation page](/docs/admin/debugging/)
-to help gain more details about issues you may come across. Within the Settings > Maintenance area of
-BookStack you can find a "Send a Test Email" action which provides a quick & easy way to send emails
-after changing your configuration. This action will also attempt to capture any errors thrown and display them.
\ No newline at end of file
diff --git a/content/docs/admin/email-webhooks.md b/content/docs/admin/email-webhooks.md
new file mode 100644 (file)
index 0000000..a9330fc
--- /dev/null
@@ -0,0 +1,133 @@
++++
+title = "Email & Webhooks"
+date = "2021-12-21"
+type = "admin-doc"
+slug = "email-webhooks"
+aliases = ["email-config"]
++++
+
+Within BookStack email is used in various ways relating to user management & authentication. 
+Outgoing webhooks are available as a mechanism to extend BookStack or notify in an event-driven manner.
+
+- [Email Configuration](#email-configuration)
+- [Outgoing Webhooks](#outgoing-webhooks)
+- [Async Action Handling](#async-action-handling)
+
+---
+
+### Email Configuration
+
+BookStack sends out emails for a range of purposes such as email-address confirmation & "forgot password" flows.
+Both SMTP and Sendmail (Linux Sendmail) are supported email mechanisms.
+
+#### SMTP
+
+To get up and running with SMTP you will need to add, or set, the following variables in your `.env` file:
+
+```bash
+MAIL_DRIVER=smtp
+
+# Host, Port & Encryption mechanism to use
+MAIL_HOST=smtp.provider.tld
+MAIL_PORT=465
+MAIL_ENCRYPTION=tls
+
+# Authentication details for your SMTP service
+MAIL_USERNAME=user@provider.tld
+MAIL_PASSWORD=onlyifneeded
+
+# The "from" email address for outgoing email
+MAIL_FROM=noreply@yourdomain.tld  
+
+# The "from" name used for outgoing email
+MAIL_FROM_NAME=BookStack
+```
+
+#### Sendmail
+
+The `sendmail` drivers uses the sendmail application on the host system. It will call `/usr/sbin/sendmail -bs`.
+
+To enable this option you can set the following in your `.env` file:
+
+```bash
+MAIL_DRIVER=sendmail
+
+# The "from" email address for outgoing email
+MAIL_FROM=noreply@yourdomain.tld  
+
+# The "from" name used for outgoing email
+MAIL_FROM_NAME=BookStack
+```
+
+#### Debugging Email
+
+You can follow the instructions provided in the [debugging documentation page](/docs/admin/debugging/)
+to help gain more details about issues you may come across. Within the "Settings > Maintenance" area of
+BookStack you can find a "Send a Test Email" action which provides a quick & easy way to send emails
+after changing your configuration. This action will also attempt to capture any errors thrown and display them.
+
+---
+
+### Outgoing Webhooks
+
+Webhooks can be configured in the "Settings > Webhooks" area of your BookStack instance.
+An example of the POST data format is shown when creating or editing a webhook.
+
+The running on webhooks can slow down a system due to the required additional processing time.
+See the [async action handling](#async-action-handling) section below to details on running webhooks
+in a background process to improve performance.
+
+---
+
+
+### Async Action Handling
+
+Actions like sending email or triggering webhooks are done synchronously by default within BookStack 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:
+
+#### Config Change
+
+Within your `.env` file add or update (if already existing) the following option then save the file.
+
+```bash
+QUEUE_CONNECTION=database
+```
+
+#### Queue Worker Process
+
+The queue work process can be run via the following command from your BookStack installation directory:
+
+```bash
+php artisan queue:work --sleep=3 --tries=3
+```
+
+Ideally this needs to be ran continuously. The method of doing this may depend on your operating system
+and personal software preferences. On many modern Linux systems systemd is an appropriate method.
+The below unit file example can be used with systemd to run this process. Note, this is suited to 
+Ubuntu 20.04 setups that have used our installation script. Details may need tweaking for other systems.
+
+```bash
+[Unit]
+Description=BookStack Queue Worker
+
+[Service]
+User=www-data
+Group=www-data
+Restart=always
+ExecStart=/usr/bin/php /var/www/bookstack/artisan queue:work --sleep=3 --tries=1 --max-time=3600
+
+[Install]
+WantedBy=multi-user.target
+```
+
+To configure systemd (On a Ubuntu 20.04 system) with the above unit you'd typically:
+
+- Create a new `/etc/systemd/system/bookstack-queue.service` file containing the above content.
+- Run `systemctl daemon-reload` to discover the new service.
+- Run `systemctl enable bookstack-queue.service` to ensure the service starts at (re)boot.
+- Run `systemctl start bookstack-queue.service` to start the queue service.
+
+Note: you may need to run the above commands with `sudo` if not acting as a privileged user. 
+You can then use `systemctl status bookstack-queue.service` to check the status of the queue worker. 
\ No newline at end of file
diff --git a/static/images/2021/12/audit_log_search.png b/static/images/2021/12/audit_log_search.png
new file mode 100644 (file)
index 0000000..cd6c438
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2056ad446986c4676641b23dbcc2a232b36ac0794fab529c9db93874b5d67660
+size 37600
diff --git a/static/images/2021/12/copy_book.png b/static/images/2021/12/copy_book.png
new file mode 100644 (file)
index 0000000..7cc0c06
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fc6eb1b4cd7f916891503545d46e033f0d8b474343fc979f7f319c8ba7c193e6
+size 36133
diff --git a/static/images/2021/12/copy_role.png b/static/images/2021/12/copy_role.png
new file mode 100644 (file)
index 0000000..41e338b
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f4fdfb46db2b1f6712ece2b63645a33ea7502198b7bb8c1688eb7f4ca929bb37
+size 16811
diff --git a/static/images/2021/12/webhook_form.png b/static/images/2021/12/webhook_form.png
new file mode 100644 (file)
index 0000000..870d9b4
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a6dab6dc875237992f3406b748b08d62cdde590a93b9db8a00e73005f0fb657f
+size 47850
diff --git a/static/images/2021/12/webhooks_list.png b/static/images/2021/12/webhooks_list.png
new file mode 100644 (file)
index 0000000..d0c7549
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6febc43feede386a14acb2cca65c7721e1cd8119076e278c9b4e3e9187b67463
+size 30570
index 627395b668ed35c8bf80947e400aaa4d26e2b657..1a01f472e6483d8cd8311ad242f0e24ad01096bb 100644 (file)
@@ -24,7 +24,7 @@
 
 <h4>Configuration</h4>
 <ul>
-       <li><a href="/docs/admin/email-config">Email Configuration</a></li>
+       <li><a href="/docs/admin/email-webhooks">Email & Webhooks</a></li>
        <li><a href="/docs/admin/visual-customisation">Visual Customisation</a></li>
        <li><a href="/docs/admin/language-config">Language &amp; Locale</a></li>
        <li><a href="/docs/admin/upload-config">File Uploads</a></li>