diff --git a/Dockerfile b/Dockerfile index ed2a597..80dc06a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM varnish:fresh-alpine +FROM varnish:7.5.0-alpine # install build dependencies USER root diff --git a/README.md b/README.md index 05359fc..bbbeaeb 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,43 @@ # Shopware Varnish Docker image The image bases on the official [Varnish image](https://hub.docker.com/_/varnish) and contains the Shopware default VCL. +The containing VCL is for the usage with xkeys. -## Additional environment variables +
+ Config for Shopware 6.6 + +```yaml +# config/packages/varnish.yaml + +shopware: + http_cache: + reverse_proxy: + enabled: true + use_varnish_xkey: true + hosts: + # address to this varnish container or all varnish containers + - localhost:6081 +``` + +
+ +
+ Config for Shopware 6.4 or 6.5 + +```yaml +# config/packages/varnish.yaml + +storefront: + reverse_proxy: + enabled: true + use_varnish_xkey: true + hosts: + # address to this varnish container or all varnish containers + - localhost:6081 +``` + +
-- `SHOPWARE_BACKEND_HOST` - The host of the Shopware backend. Default: `localhost` -- `SHOPWARE_BACKEND_PORT` - The port of the Shopware backend. Default: `8000` -- `SHOPWARE_SOFT_PURGE` - If set to `1`, the soft purge feature is enabled. Default: `0` ## Example usage @@ -17,6 +48,15 @@ docker run \ # host ip where Shopware is -e SHOPWARE_BACKEND_HOST=host.docker.internal \ -p 8080:80 \ - --name=varnish \ - varnish + ghcr.io/shopwarelabs/varnish:latest ``` + +## Additional environment variables + +- `SHOPWARE_BACKEND_HOST` - The host of the Shopware backend. Default: `localhost` +- `SHOPWARE_BACKEND_PORT` - The port of the Shopware backend. Default: `8000` +- `SHOPWARE_SOFT_PURGE` - If set to `1`, the soft purge feature is enabled. Default: `0` + +## Further information + +As this image bases on the Official Varnish image, you can use all options available there. For more information, please visit the [official Varnish image documentation](https://hub.docker.com/_/varnish).