-
Notifications
You must be signed in to change notification settings - Fork 6
Caddyfile #3
Comments
Caddyfile support isn't implemented yet, see the TODO in the README https://github.com/vrongmeal/caddygit#todo |
Hello, I would seek to reopen this issue, as it's not yet resolved. It's been more than a year since the last update of this issue and I sincerely believe Caddyfile support is something that some people are still waiting for. |
Reopening the issue. I would love to see if anyone's willing to work on this. |
I have been working in the project to bring inn the support for the Caddyfile. You can find it here: However I'm facing some issues and I would like your help. I wrote this configuration:
But after running Caddy and opening the website http://localhost:2000/, I get the following error in the output:
I was looking how to mimic the behavior from Caddy v1 where you just need to specify the git directive to bring your website online, but I'm not seeing how to get there. |
@rigon that error is due to a bug, this line https://github.com/rigon/caddygit/blob/fbb915b726b534010a2eb7b563ec8b3ebeacdfd0/services/webhook/service.go#L158 is writing the status code, but it shouldn't - the Caddy server itself will write the But your repo is only half of the Caddyfile support this repo needs. You only have support for configuring the webhook (which is how the Caddy app would accept notifications about changes to a repo). Support for configuring the "app" will be needed, and that can be done via global options (with |
Yes, it is still half way implemented. Once I have basics working well I will think about supporting the full options. |
@francislavoie Can you help me finish this bit? I don't know how to inject the Handler Directive configuration into the App's configuration. The goal is adding a client when the git directive is found in a site block. Or maybe I'm not seeing the problem clearly. |
You need to construct a The idea of the Caddyfile adapter is that you fill out the structs, then Caddy will JSON serialize it (see the Also, that TODO comment doesn't really make sense, the handler isn't "sent" to the app, the handler module is its own thing. Handlers are configured within the
|
Hi!
I think may be interesting make a Caddyfile example (of this module) for caddy v2. Thanks for doing this module 😄
The text was updated successfully, but these errors were encountered: