Commit Graph

16 Commits

Author SHA1 Message Date
Catherine
80e3d7ff56 Turn off Caddy's admin interface and expose metrics on the same port. 2025-09-22 16:26:55 +00:00
Catherine
e78f70626e Fly.io: enable Caddy metrics collection. 2025-09-22 09:50:01 +00:00
Catherine
247922a093 Fly.io: configure concurrency.
The default is 20, and is regularly reached by crawlers or overly
enthusiastic browsers. The actual concurrency limit is likely closer
to 500-1000.
2025-09-22 08:42:12 +00:00
Catherine
a159dba0b8 [breaking-change] Redesign environment var configuration overrides.
This is done using reflection to avoid boilerplate and potential desync
of the two configuration interfaces. The `[[wildcards]]` section did
not fit well into the "splat every config key" paradigm, so it is
unmarshalled as a whole from a JSON payload in an environment variable.

This commit also splits up the `Config` type into small per-section
struct types and removes most references to the global `config` in
favor of passing pointers to sections around.

A new option, `-print-config-env-vars`, shows the names and types of
all of the available configuration knobs.
2025-09-22 07:02:42 +00:00
Catherine
d81676fea0 Miscellaneous minor configuration related fixes. 2025-09-22 01:31:41 +00:00
Catherine
e59699ab1a Configure Caddy to use PROXY protocol for X-Forwarded-For. 2025-09-21 14:27:25 +00:00
Catherine
d4f5420875 Configure Caddy to use HTTP/3.
Also, add `Alt-Svc:` headers for both H2 and H3.
2025-09-21 14:27:25 +00:00
Catherine
9d18700834 Switch from Nix back to Docker for deployment. 2025-09-20 00:12:55 +00:00
Catherine
859c4bef77 Make Fly.io health checks more aggressive. 2025-09-19 21:08:35 +00:00
Catherine
3d23d58fbb Make supervisord and Caddy less chatty. 2025-09-19 21:08:21 +00:00
bin
da212dcb89 Aggressively optimise size of Nix built Docker images 2025-09-19 04:23:57 +00:00
bin
54c9a0a77e Allow building containers using Nix.
fly auth docker && \
    nix build .#image -L && \
    docker load < result && \
    docker tag git-pages:latest registry.fly.io/git-pages:latest && \
    docker push registry.fly.io/git-pages:latest
2025-09-18 22:50:23 -04:00
Catherine
2548effeb8 Unify Caddy and git-pages health checks. 2025-09-18 13:50:48 +00:00
Catherine
810dc9cea0 Disable swap on fly.io.
This just results in latency spikes with big uploads.
2025-09-18 13:23:38 +00:00
Catherine
d48c754b9e Switch from hivemind to supervisord.
Hivemind doesn't have auto-restart capability (it quits with code 0,
which just stops the VM).
2025-09-18 12:15:23 +00:00
Catherine
b85b762ba9 [breaking-change] Update Dockerfile to add Caddy and a fly.io deployment option. 2025-09-18 05:14:04 +00:00