mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
feat: add build tag to skip Brotli support (#1070)
* feat: add build tag to skip Brotli support * update docs
This commit is contained in:
@@ -81,7 +81,6 @@ XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s'" \
|
||||
xcaddy build \
|
||||
--output frankenphp \
|
||||
--with github.com/dunglas/frankenphp/caddy \
|
||||
--with github.com/dunglas/caddy-cbrotli \
|
||||
--with github.com/dunglas/mercure/caddy \
|
||||
--with github.com/dunglas/vulcain/caddy
|
||||
# Add extra Caddy modules here
|
||||
@@ -96,3 +95,24 @@ xcaddy build \
|
||||
> To do so, change the `XCADDY_GO_BUILD_FLAGS` environment variable to something like
|
||||
> `XCADDY_GO_BUILD_FLAGS=$'-ldflags "-w -s -extldflags \'-Wl,-z,stack-size=0x80000\'"'`
|
||||
> (change the value of the stack size according to your app needs).
|
||||
|
||||
## Build Tags
|
||||
|
||||
Additional features can be enabled if the required C libraries are installed by
|
||||
passing additional build tags to the Go compiler:
|
||||
|
||||
| Tag | Dependencies | Description |
|
||||
|--------|--------------------------------------------|--------------------------------------------------|
|
||||
| brotli | [Brotli](https://github.com/google/brotli) | Add a Caddy module supporting Brotli compression |
|
||||
|
||||
When using `go build` directly, pass the additional `-tags` option followed by the comma-separated list of tags:
|
||||
|
||||
```console
|
||||
go build -tags brotli
|
||||
```
|
||||
|
||||
When using `xcaddy`, set the `-tags` option in the `XCADDY_GO_BUILD_FLAGS` environment variable:
|
||||
|
||||
```console
|
||||
XCADDY_GO_BUILD_FLAGS="-tags brotli"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user