generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.varnish.yaml
31 lines (31 loc) · 1.07 KB
/
docker-compose.varnish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ddev-generated
services:
varnish:
container_name: ddev-${DDEV_SITENAME}-varnish
image: varnish:6.0
# These labels ensure this service is discoverable by ddev.
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
environment:
# This defines the host name the service should be accessible from. This
# will be sitename.ddev.site.
# This is the first half of the trick that puts varnish "in front of" the
# web container, just by switching the names.
- VIRTUAL_HOST=$DDEV_HOSTNAME
# This defines the ports the service should be accessible from at
# sitename.ddev.site.
- HTTPS_EXPOSE=443:80,8026:8025
- HTTP_EXPOSE=80:80,8025:8025
volumes:
# This exposes a mount to the host system `.ddev/varnish` directory where
# your default.vcl should be.
- "./varnish:/etc/varnish"
- ".:/mnt/ddev_config"
depends_on:
- web
# Add mailhog support
expose:
- "8025"
entrypoint:
/usr/local/bin/docker-varnish-entrypoint -a 0.0.0.0:8025