The Wayback Machine - https://web.archive.org/web/20221012032716/https://github.com/caddyserver/caddy/issues/3517
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

Watch directory #3517

Open
p3lim opened this issue Jun 22, 2020 · 3 comments
Open

Watch directory #3517

p3lim opened this issue Jun 22, 2020 · 3 comments
Labels
feature New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@p3lim
Copy link

p3lim commented Jun 22, 2020

Using this import example, loading a whole directory of config files, it would be nice if the --watch flag could monitor an entire directory as well. Being able to glob just like the import directive would be awesome as well.

@mholt mholt added the feature New feature or request label Jun 22, 2020
@francislavoie
Copy link
Member

francislavoie commented Feb 22, 2021

One way this could be resolved is to always load + adapt the config file without looking at the main config file's modification time. This would definitely be more expensive though because it'll always be doing IO operations. But it might be worth doing 🤔

@KoHcoJlb
Copy link

KoHcoJlb commented Jun 23, 2022

Hello, I've also stumbled across this.

I think such overhead will be negligible, moreover we can increase delay between reloads to, for example, 3 seconds instead of 1.
But there are info messages printed every time config is loaded. If those can be removed, this would be good way to go.

Other approach is to look for import directives in Caddyfile and if they're pointing to files watch them too.

What do you think?

@francislavoie francislavoie added help wanted Extra attention is needed good first issue Good for newcomers labels Oct 3, 2022
@francislavoie
Copy link
Member

francislavoie commented Oct 3, 2022

Us maintainers don't really have a need for this feature, so we don't have much motivation to work on it.

If someone wants to take a crack at it though, we'd be glad to review a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants
@p3lim @mholt @francislavoie @KoHcoJlb and others