Skip to content

Commit c873e92

Browse files
committed
feat: add MERCURE_BOLT_PATH and MERCURE_BOLT_EXTRA_DIRECTIVES Caddyfile options
1 parent 6c1f6f9 commit c873e92

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/options.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ to inject options block, directive or configuration.
8585
| `FRANKENPHP_CONFIG` | a list of extra [FrankenPHP global directives](https://frankenphp.dev/docs/config/#caddyfile-config), one per line | |
8686
| `FRANKENPHP_WORKER_CONFIG` | a list of extra [FrankenPHP worker directives](https://frankenphp.dev/docs/config/#caddyfile-config), one per line | |
8787
| `MERCURE_TRANSPORT_URL` | the value passed to the `transport_url` directive | `bolt:///data/mercure.db` |
88+
| `MERCURE_BOLT_PATH` | path of the Bolt database file | `/data/mercure.db` |
89+
| `MERCURE_BOLT_EXTRA_DIRECTIVES` | a list of extra [Mercure Bolt Adapter directives](https://mercure.rocks/docs/hub/config#bolt-adapter), one per line | |
8890
| `MERCURE_PUBLISHER_JWT_KEY` | the JWT key to use for publishers | |
8991
| `MERCURE_PUBLISHER_JWT_ALG` | the JWT algorithm to use for publishers | `HS256` |
9092
| `MERCURE_SUBSCRIBER_JWT_KEY` | the JWT key to use for subscribers | |

frankenphp/Caddyfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
encode zstd br gzip
3232

3333
mercure {
34+
# The transport to use
35+
transport bolt {
36+
path {$MERCURE_BOLT_PATH:/data/mercure.db}
37+
{$MERCURE_BOLT_EXTRA_DIRECTIVES}
38+
}
3439
# Publisher JWT key
3540
publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG}
3641
# Subscriber JWT key

0 commit comments

Comments
 (0)