eratic / deploy / server / Caddyfile
291 words
 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
{
	# Bound to the container's own loopback rather than turned off.
	#
	# Off would be marginally safer, but `caddy reload` talks to this endpoint,
	# and without it every config change means restarting the container and
	# dropping live connections. localhost:2019 is not published by the compose
	# file and not reachable across the Docker network, so reaching it requires
	# already having root on the host — at which point the admin API is not the
	# weak link.
	admin localhost:2019

	# Let's Encrypt certificates are issued and renewed automatically for every
	# hostname in conf.d/. Nothing to renew, nothing to remember.
	#
	# No contact address on purpose: it would only ever receive expiry warnings
	# that cannot happen here, and it is one less identifier attached to this
	# box.

	servers {
		protocols h1 h2 h3
	}
}

# Server-wide Caddy config.
# ---------------------------------------------------------------------------
# This file deliberately contains nothing about any particular site. Every
# project on this box drops its own file into conf.d/ and reloads; this one
# only sets what is true for the whole machine.
#
# That separation is the point. Adding cheri.ro or agoreni.ro later means one
# new file in conf.d/ and a DNS record — no edit here, nothing to overwrite,
# and no way for one site's mistake to take another down, because Caddy
# validates the entire set before it will load any of it.
#
# The global options block has to come first in a Caddyfile, before anything
# else including this comment — putting the explanation above it is what makes
# Caddy warn that the input is not formatted on every single reload.

# Every site on this box.
import /etc/caddy/conf.d/*.caddy

static mirror of HEAD · about · clone: git clone https://git.makefuture.ro/eratic.git