···35RUN mkdir /app/data
36COPY conf/supervisord.conf /app/supervisord.conf
37COPY conf/Caddyfile /app/Caddyfile
38-RUN caddy adapt -c Caddyfile -p >/app/caddy.json
39COPY conf/config.toml.example /app/config.toml
4041# Caddy ports:
42-EXPOSE 80 443 2019
43# git-pages ports:
44-EXPOSE 3000 3001 3002
4546# While the default command is to run git-pages standalone, the intended configuration
47# is to use it with Caddy and store both site data and credentials to an S3-compatible
···35RUN mkdir /app/data
36COPY conf/supervisord.conf /app/supervisord.conf
37COPY conf/Caddyfile /app/Caddyfile
038COPY conf/config.toml.example /app/config.toml
3940# Caddy ports:
41+EXPOSE 80/tcp 443/tcp 443/udp 2019/tcp
42# git-pages ports:
43+EXPOSE 3000/tcp 3001/tcp 3002/tcp
4445# While the default command is to run git-pages standalone, the intended configuration
46# is to use it with Caddy and store both site data and credentials to an S3-compatible
+22-8
conf/Caddyfile
···40 protocols h1 h2
41 }
420000043 servers :2002 {
44 name health
45 protocols h1
46 }
47}
4849-(backend_pages) {
000050 @h2c `{env.FEATURES}.matches(r"\bh2c\b")`
51 reverse_proxy @h2c h2c://{$GIT_PAGES_ADDRESS:localhost}:3000
52 reverse_proxy http://{$GIT_PAGES_ADDRESS:localhost}:3000
00053}
5455http:// {
056 @get method GET
57 redir @get https://{host}{uri} 301
5859- # initial PUT/POST for a new domain has to happen over HTTP
60- import backend_pages
61}
6263https:// {
64- tls {
65- on_demand
66- }
0006768- encode
69- import backend_pages
70}
7172http://localhost:2002 {
···40 protocols h1 h2
41 }
4243+ servers {$UDP_BIND_TO:0.0.0.0}:443 {
44+ name http3
45+ protocols h3
46+ }
47+48 servers :2002 {
49 name health
50 protocols h1
51 }
52}
5354+(backend) {
55+ tls {
56+ on_demand
57+ }
58+59 @h2c `{env.FEATURES}.matches(r"\bh2c\b")`
60 reverse_proxy @h2c h2c://{$GIT_PAGES_ADDRESS:localhost}:3000
61 reverse_proxy http://{$GIT_PAGES_ADDRESS:localhost}:3000
62+63+ header Alt-Svc `h3=":443"; persist=1, h2=":443"; persist=1`
64+ encode
65}
6667http:// {
68+ # initial PUT/POST for a new domain has to happen over HTTP
69 @get method GET
70 redir @get https://{host}{uri} 301
7172+ import backend
073}
7475https:// {
76+ import backend
77+}
78+79+https:// {
80+ # Fly.io requires UDP sockets to be bound to a different IP
81+ bind {$UDP_BIND_TO:0.0.0.0}
8283+ import backend
084}
8586http://localhost:2002 {