caddytls: Allow disabling storage cleaning, avoids writing two files#6593
caddytls: Allow disabling storage cleaning, avoids writing two files#6593
Conversation
|
Thanks for working on this! A couple questions/thoughts:
|
|
Forgot to link the related forum thread https://caddy.community/t/disabling-file-storage/25772, those 2 files get written which is undesirable in a setup with the goal of being read-only. The way I see it, doesn't hurt to have this option, solves an edgecase for someone. Very simple implementation.
I dunno, an option that does too much is not better. |
|
I often want to use read-only mode when I'm running an ephemeral Caddy instance purely for testing, e.g. to verify a server's behavior behind a reverse proxy. Something trivial like If the main (only?) use of the "storage" module relates to certificate maintence, it should be reasonable to avoid running this when TLS is disabled. If I run |
c589c37 to
4ad1b9b
Compare
Some users want to run Caddy in a totally read-only mode, but currently storage cleaning implicitly creates two files
instance.uuidandlast_clean.jsonwhich are undesirable in that situation. We can simply skip starting the storage cleaning goroutine via a config option.I noticed
storage_check offwasn't configurable in the Caddyfile, so I added that too, while I was at it.