Skip to content

Commit f592728

Browse files
committed
[varnish] add a few words about port variables
1 parent dd6e1ec commit f592728

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

varnish/content.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,26 @@ docker run varnish varnishreload -h
8585

8686
## Additional configuration
8787

88+
### Cache size (VARNISH_SIZE)
89+
8890
By default, the containers will use a cache size of 100MB, which is usually a bit too small, but you can quickly set it through the `VARNISH_SIZE` environment variable:
8991

9092
```console
9193
$ docker run --tmpfs /var/lib/varnish/varnishd:exec -p 8080:80 -e VARNISH_SIZE=2G %%IMAGE%%
9294
```
9395

94-
Additionally, you can add arguments to `docker run` after `%%IMAGE%%`, if the first one starts with a `-`, they will be appendend to the [default command](https://github.com/varnish/docker-varnish/blob/master/docker-varnish-entrypoint#L8):
96+
### Listening ports (VARNISH_HTTP_PORT/VARNISH_PROXY_PORT)
97+
98+
Varnish will listen to HTTP traffic on port `80`, and this can be overridden by setting the environment variable `VARNISH_HTTP_PORT`. Similarly, the variable `VARNISH_PROXY_PORT` (defaulting to `8443`) dictate the listening port for the [PROXY protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) used notably to interact with [hitch](https://hub.docker.com/_/hitch) (which, coincidentally, uses `8443` as a default too!).
99+
100+
```console
101+
# instruct varnish to listening to port 7777 instead of 80
102+
$ docker run --tmpfs /var/lib/varnish/varnishd:exec -p 8080:7777 -e VARNISH_HTTP_PORT=7777 %%IMAGE%%
103+
```
104+
105+
### Extra arguments
106+
107+
Additionally, you can add arguments to `docker run` after `%%IMAGE%%`, if the first argument starts with a `-`, the whole list will be appendend to the [default command](https://github.com/varnish/docker-varnish/blob/master/fresh/debian/scripts/docker-varnish-entrypoint):
95108

96109
```console
97110
# extend the default keep period

0 commit comments

Comments
 (0)