-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
59 lines (53 loc) · 1.5 KB
/
docker-compose.yml
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
55
56
57
58
59
version: '2'
services:
varnish:
image: registry.gitlab.com/strowi/varnish:latest
build: ./
restart: always
network_mode: host
mem_limit: 2g
volumes:
- ./src:/etc/varnish
- varnish_tmpfs:/var/lib/varnish
environment:
MALLOC_CONF: lg_dirty_mult:8,lg_chunk:18
BIND_PORT: :80
CACHE_SIZE: 1G
VCL_CONFIG: /etc/varnish/default.vcl
VARNISHD_PARAMS: -p default_ttl=120 -p default_grace=3600 -p nuke_limit=99999 -S /etc/varnish/secret -T 127.0.0.1:6082 -p vcl_dir=/etc/varnish/
exporter:
image: registry.gitlab.com/strowi/varnish:latest
restart: always
network_mode: host
depends_on:
- varnish
volumes:
- ./src:/etc/varnish:ro
- varnish_tmpfs:/var/lib/varnish/:ro
command: prometheus_varnish_exporter
varnishncsa:
image: registry.gitlab.com/strowi/varnish:latest
restart: always
network_mode: host
depends_on:
- varnish
volumes:
- ./src:/etc/varnish:ro
- varnish_tmpfs:/var/lib/varnish/:ro
command: varnishncsa -q 'RespStatus ~ "^50"'
# varnishtop:
# registry.gitlab.com/strowi/varnish:latest
# restart: always
# network_mode: host
# depends_on:
# - varnish
# volumes:
# - ./src:/etc/varnish:ro
# - varnish_tmpfs:/var/lib/varnish/:ro
# # - /var/lib/node_exporter/textfile/:/var/lib/node_exporter/textfile/
# command: /etc/varnish/varnishtop_export.sh
volumes:
varnish_tmpfs:
driver_opts:
type: tmpfs
device: tmpfs