-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
44 lines (39 loc) · 1.3 KB
/
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
#
# This is intended to set up Varnish to run under Docker Compose.
# For swarm, use the file "swarm.yaml" instead.
#
volumes:
certs:
name: certs
external: true
services:
# Varnish and hitch will communicate over port 8443 over the proxy network
# 2023-03-27 Note the "enterprise" (not free) version of Varnish has TLS built in.
# I imagine eventually Hitch will be deprecated.
# I listen for everything on port 443, using Let's Encrypt certificates
# and then send everything over the PROXY connection to Varnish on port 8443
hitch:
# image: nginx:latest # Hacky way to test settings (won't keep crashing and restarting)
image: hitch
volumes:
- ./etc/hitch.conf:/etc/hitch/hitch.conf:ro
- certs:/etc/letsencrypt:ro
ports:
# You can move to port 444 if you want to do testing on production server
- "443:443"
restart: always
hostname: hitch
# I need to have port 80 visible so that I can redirect traffic to TLS.
# Everything else comes in from hitch.
varnish:
image: ghcr.io/wildsong/varnish:latest
build:
context: .
dockerfile: Dockerfile
volumes:
- ./etc/default.cc-testmaps.vcl:/etc/varnish/default.vcl
ports:
- "80:80"
tmpfs: "/var/lib/varnish/varnishd:rw,exec"
restart: always
hostname: varnish