Skip to content

Commit 1fb38e2

Browse files
Run update.sh
1 parent 1be82b9 commit 1fb38e2

File tree

2 files changed

+21
-29
lines changed

2 files changed

+21
-29
lines changed

nginx/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ WARNING:
2626

2727
- [`1.25.4`, `mainline`, `1`, `1.25`, `latest`, `1.25.4-bookworm`, `mainline-bookworm`, `1-bookworm`, `1.25-bookworm`, `bookworm`](https://github.com/nginxinc/docker-nginx/blob/1f227619c1f1baa0bed8bed844ea614437ff14fb/mainline/debian/Dockerfile)
2828
- [`1.25.4-perl`, `mainline-perl`, `1-perl`, `1.25-perl`, `perl`, `1.25.4-bookworm-perl`, `mainline-bookworm-perl`, `1-bookworm-perl`, `1.25-bookworm-perl`, `bookworm-perl`](https://github.com/nginxinc/docker-nginx/blob/1f227619c1f1baa0bed8bed844ea614437ff14fb/mainline/debian-perl/Dockerfile)
29+
- [`1.25.4-otel`, `mainline-otel`, `1-otel`, `1.25-otel`, `otel`, `1.25.4-bookworm-otel`, `mainline-bookworm-otel`, `1-bookworm-otel`, `1.25-bookworm-otel`, `bookworm-otel`](https://github.com/nginxinc/docker-nginx/blob/9cb278860bdcea48abc0bc770a29ead3fc9a1fe6/mainline/debian-otel/Dockerfile)
2930
- [`1.25.4-alpine`, `mainline-alpine`, `1-alpine`, `1.25-alpine`, `alpine`, `1.25.4-alpine3.18`, `mainline-alpine3.18`, `1-alpine3.18`, `1.25-alpine3.18`, `alpine3.18`](https://github.com/nginxinc/docker-nginx/blob/1f227619c1f1baa0bed8bed844ea614437ff14fb/mainline/alpine/Dockerfile)
3031
- [`1.25.4-alpine-perl`, `mainline-alpine-perl`, `1-alpine-perl`, `1.25-alpine-perl`, `alpine-perl`, `1.25.4-alpine3.18-perl`, `mainline-alpine3.18-perl`, `1-alpine3.18-perl`, `1.25-alpine3.18-perl`, `alpine3.18-perl`](https://github.com/nginxinc/docker-nginx/blob/1f227619c1f1baa0bed8bed844ea614437ff14fb/mainline/alpine-perl/Dockerfile)
3132
- [`1.25.4-alpine-slim`, `mainline-alpine-slim`, `1-alpine-slim`, `1.25-alpine-slim`, `alpine-slim`, `1.25.4-alpine3.18-slim`, `mainline-alpine3.18-slim`, `1-alpine3.18-slim`, `1.25-alpine3.18-slim`, `alpine3.18-slim`](https://github.com/nginxinc/docker-nginx/blob/1f227619c1f1baa0bed8bed844ea614437ff14fb/mainline/alpine-slim/Dockerfile)
33+
- [`1.25.4-alpine-otel`, `mainline-alpine-otel`, `1-alpine-otel`, `1.25-alpine-otel`, `alpine-otel`, `1.25.4-alpine3.18-otel`, `mainline-alpine3.18-otel`, `1-alpine3.18-otel`, `1.25-alpine3.18-otel`, `alpine3.18-otel`](https://github.com/nginxinc/docker-nginx/blob/9cb278860bdcea48abc0bc770a29ead3fc9a1fe6/mainline/alpine-otel/Dockerfile)
3234
- [`1.24.0`, `stable`, `1.24`, `1.24.0-bullseye`, `stable-bullseye`, `1.24-bullseye`](https://github.com/nginxinc/docker-nginx/blob/1a8d87b69760693a8e33cd8a9e0c2e5f0e8b0e3c/stable/debian/Dockerfile)
3335
- [`1.24.0-perl`, `stable-perl`, `1.24-perl`, `1.24.0-bullseye-perl`, `stable-bullseye-perl`, `1.24-bullseye-perl`](https://github.com/nginxinc/docker-nginx/blob/1a8d87b69760693a8e33cd8a9e0c2e5f0e8b0e3c/stable/debian-perl/Dockerfile)
3436
- [`1.24.0-alpine`, `stable-alpine`, `1.24-alpine`, `1.24.0-alpine3.17`, `stable-alpine3.17`, `1.24-alpine3.17`](https://github.com/nginxinc/docker-nginx/blob/1a8d87b69760693a8e33cd8a9e0c2e5f0e8b0e3c/stable/alpine/Dockerfile)

varnish/README.md

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -66,34 +66,26 @@ Varnish is an HTTP accelerator designed for content-heavy dynamic web sites as w
6666

6767
## Basic usage
6868

69-
Create a `default.vcl` file:
70-
71-
```vcl
72-
# specify the VCL syntax version to use
73-
vcl 4.1;
74-
75-
# import vmod_dynamic for better backend name resolution
76-
import dynamic;
77-
78-
# we won't use any static backend, but Varnish still need a default one
79-
backend default none;
80-
81-
# set up a dynamic director
82-
# for more info, see https://github.com/nigoroll/libvmod-dynamic/blob/master/src/vmod_dynamic.vcc
83-
sub vcl_init {
84-
new d = dynamic.director(port = "80");
85-
}
86-
87-
sub vcl_recv {
88-
# force the host header to match the backend (not all backends need it,
89-
# but example.com does)
90-
set req.http.host = "example.com";
91-
# set the backend
92-
set req.backend_hint = d.backend("example.com");
93-
}
69+
### Using `VARNISH_BACKEND_HOST` and `VARNISH_BACKEND_PORT`
70+
71+
You just need to know where your backend (the server that Varnish will accelerate) is:
72+
73+
```console
74+
# we define VARNISH_BACKEND_HOST/VARNISH_BACKEND_PORT
75+
# our workdir has to be mounted as tmpfs to avoid disk I/O,
76+
# and we'll use port 8080 to talk to our container (internally listening on 80)
77+
$ docker run \
78+
-e VARNISH_BACKEND_HOST=example.com -e VARNISH_BACKEND_PORT=80 \
79+
--tmpfs /var/lib/varnish/varnishd:exec \
80+
-p 8080:80 \
81+
varnish
9482
```
9583

96-
Then run:
84+
From there, you can visit `localhost:8080` in your browser and see the example.com homepage.
85+
86+
### Using a VCL file
87+
88+
If you already have a VCL file, you can directly mount it as `/etc/varnish/default.vcl`:
9789

9890
```console
9991
# we need the configuration file at /etc/varnish/default.vcl,
@@ -106,9 +98,7 @@ $ docker run \
10698
varnish
10799
```
108100

109-
From there, you can visit `localhost:8080` in your browser and see the example.com homepage.
110-
111-
Alternatively, a simple `Dockerfile` can be used to generate a new image that includes the necessary `default.vcl` (which is a much cleaner solution than the bind mount above):
101+
Alternatively, a simple `Dockerfile` can be used to generate a new image that includes the necessary `default.vcl`:
112102

113103
```dockerfile
114104
FROM varnish

0 commit comments

Comments
 (0)