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

How to reload caddy after fetching git repo? #59

Open
Zhomart opened this issue May 29, 2017 · 4 comments
Open

How to reload caddy after fetching git repo? #59

Zhomart opened this issue May 29, 2017 · 4 comments

Comments

@Zhomart
Copy link

Zhomart commented May 29, 2017

There might be many reasons to reload caddy after updating git repo.

In my case I use markdown and templates with markdown directive. Example:

localhost {
  root /var/www/html

  git {
    repo myrepo.git
    path /var/caddy-repo
    then rsync -a --delete --force --update /var/caddy-repos/content/ /var/www/html
  }

  ext .md

  markdown / {
    template templates/default.html
    template nice templates/nice.html
  }
  
}

When I update content/templates/nice.html, without reloading caddy it won't update the template file.

But if I add then sudo systemctl reload caddy to Caddyfile, it gets trapped to reload and git fetch loop.

Is it possible to internally somehow reload configuration? Or is it an issue of markdown directive?

@abiosoft
Copy link
Owner

Oh I think the templates are in-memory and this is more of an issue with markdown than with Git.

@Zhomart
Copy link
Author

Zhomart commented Jun 22, 2017

Is it possible to have way to reload configuration without using systemctl or any external command?

@abiosoft
Copy link
Owner

Not right now but it can be added as a feature to Git

@philippgille
Copy link

What's the current state regarding this issue? I think even if this specific case is a markdown plugin issue (keeping the templates in-memory), it would be great to have the option to reload Caddy after a git pull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants