Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caddytls: Allow disabling storage cleaning, avoids writing two files #6593

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

francislavoie
Copy link
Member

@francislavoie francislavoie commented Sep 27, 2024

Some users want to run Caddy in a totally read-only mode, but currently storage cleaning implicitly creates two files instance.uuid and last_clean.json which are undesirable in that situation. We can simply skip starting the storage cleaning goroutine via a config option.

I noticed storage_check off wasn't configurable in the Caddyfile, so I added that too, while I was at it.

@francislavoie francislavoie added the feature ⚙️ New feature or request label Sep 27, 2024
@mholt
Copy link
Member

mholt commented Oct 1, 2024

Thanks for working on this! A couple questions/thoughts:

  • What is the harm of trying to write these two files?
  • Maybe we should just have a read_only mode in the global options (if it is actually needed). I don't know if I love this granularity since you need to turn several knobs for one thing.

@francislavoie
Copy link
Member Author

francislavoie commented Oct 1, 2024

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.

Maybe we should just have a read_only mode in the global options (if it is actually needed). I don't know if I love this granularity since you need to turn several knobs for one thing.

I dunno, an option that does too much is not better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants