forked from gquintard/docker-howto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
114 lines (105 loc) · 2.36 KB
/
docker-compose.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
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
version: '2'
services:
varnish:
container_name: varnish-varnish
image: "tstrohmeier/gquintard-varnish-docker"
build:
context: ./
dockerfile: Dockerfile
ports:
- "1080:80"
environment:
- SINGLE=varnish
- VARNISH_OPTS=-n /var/lib/varnish -T :6082
volumes:
- workdir:/var/lib/varnish
- ./conf/etc/varnish:/etc/varnish
links:
- stunnel
- socat
depends_on:
- stunnel
- socat
hitch:
container_name: varnish-hitch
image: "tstrohmeier/gquintard-varnish-docker"
build:
context: ./
dockerfile: Dockerfile
ports:
- "1443:443"
environment:
- SINGLE=hitch
- HITCH_OPTS=
agent:
container_name: varnish-agent
image: "tstrohmeier/gquintard-varnish-docker"
build:
context: ./
dockerfile: Dockerfile
ports:
- "1085:6085"
environment:
- SINGLE=agent
- AGENT_OPTS=-n /var/lib/varnish -T varnish:6082
- STAT_OPTS=-n /var/lib/varnish
volumes:
- workdir:/var/lib/varnish
- ./conf/etc/varnish/:/etc/varnish/
links:
- stunnel
- socat
depends_on:
- stunnel
- socat
log:
container_name: varnish-log
image: "tstrohmeier/gquintard-varnish-docker"
build:
context: ./
dockerfile: Dockerfile
environment:
- SINGLE=log
- STAT_OPTS=-n /var/lib/varnish
####### Default log (backend & frontend)
# - LOG_OPTS=-n /var/lib/varnish
####### Log only backend requests #######
- LOG_OPTS=-n /var/lib/varnish -b
####### Log only client requests #######
# - LOG_OPTS=-n /var/lib/varnish -c
volumes:
- workdir:/var/lib/varnish
- ./conf/etc/varnish/:/etc/varnish/
links:
- stunnel
- socat
depends_on:
- varnish
- stunnel
- socat
stunnel:
container_name: varnish_stunnel_proxy
image: tstrohmeier/stunnel-client
restart: always
ports:
- "8888:8888"
environment:
- ACCEPT=8888
- CONNECT=your.server.com:443
socat:
container_name: varnish_socat_proxy
image: alpine/socat
restart: always
command: -v tcp-listen:7777,fork,reuseaddr tcp-connect:stunnel:8888
ports:
- "7777:7777"
links:
- stunnel
depends_on:
- stunnel
volumes:
workdir:
driver: local
driver_opts:
type: tmpfs
device: tmpfs