-
-
Notifications
You must be signed in to change notification settings - Fork 654
/
docker-compose.override.yml-varnish
54 lines (51 loc) · 1.53 KB
/
docker-compose.override.yml-varnish
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# vim: set ft=yaml:
---
version: '2.3'
services:
# -----------------------------------------------------------------------------------------------
# Varnish
# -----------------------------------------------------------------------------------------------
varnish:
image: devilbox/varnish:${VARNISH_SERVER:-6}-0.3
hostname: varnish
ports:
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_VARNISH:-6081}:6081"
networks:
app_net:
ipv4_address: 172.16.238.230
environment:
- VARNISH_CONFIG=${VARNISH_CONFIG:-/etc/varnish/default.vcl}
- CACHE_SIZE=${VARNISH_CACHE_SIZE:-128m}
- VARNISHD_PARAMS=${VARNISH_PARAMS:--p default_ttl=3600 -p default_grace=3600}
- BACKEND_HOST=httpd
- BACKEND_PORT=80
volumes:
- ${DEVILBOX_PATH}/cfg/varnish-${VARNISH_SERVER:-6}:/etc/varnish.d
depends_on:
- bind
- php
- httpd
haproxy:
image: devilbox/haproxy:0.3
hostname: haproxy
ports:
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_HAPROXY:-8080}:80"
- "${LOCAL_LISTEN_ADDR}${HOST_PORT_HAPROXY_SSL:-8443}:443"
networks:
app_net:
ipv4_address: 172.16.238.231
environment:
- BACKEND_ADDR=varnish
- BACKEND_PORT=6081
- DEVILBOX_UI_SSL_CN
- TLD_SUFFIX
volumes:
# Certificate Authority public key
- ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS}
# Mount custom mass virtual hosting
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
depends_on:
- bind
- php
- httpd
- varnish