Skip to content

Commit

Permalink
improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Apr 12, 2024
1 parent a591baa commit c4a9f97
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM varnish:fresh-alpine
FROM varnish:7.5.0-alpine

# install build dependencies
USER root
Expand Down
52 changes: 46 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
<details>
<summary>Config for Shopware 6.6</summary>

```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
```
</details>
<details>
<summary>Config for Shopware 6.4 or 6.5</summary>
```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
```
</details>
- `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
Expand All @@ -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).

0 comments on commit c4a9f97

Please sign in to comment.