-
Notifications
You must be signed in to change notification settings - Fork 18
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
panic: interface conversion: interface {} is nil, not *caddyhttp.Server #52
Comments
Caddyfile:
Dockerfile: FROM caddy:builder AS builder
RUN xcaddy build \
--with github.com/kirsch33/realip \
--with github.com/sillygod/cdp-cache
FROM caddy:latest
COPY --from=builder /usr/bin/caddy /usr/bin/caddy |
The problem was that I was building from the latest version of caddy. |
Let's keep this open as this won't work with v2.5.1. |
Thanks for noting this package is not compatible with the caddy v2.5.1. However, keeping updated with the latest version of caddy is not in high priority! It may be upgraded someday. |
I hit the same issue. Is it realty that much work to update? From a usage point of view it's the difference between being able to just download a caddy binary with the cdp-cache module vs. having to set-up a whole compilation environment... |
I made so many failed attempts to compile it. I am not a go developer. Kind of delayed my caching by 9 months Did not have much traffic, so was not a hot issue. With Bastille containers, I got it compiling really quickly. Created a container, installed some tools, and then downloaded the go executable. It was so easy. When I got it wrong, I just deleted the container and repeated. I could not do that with my regular development environment. In fact I would be happy to publish my Bastille container, if anyone is interested. There is a larger problem at work here. You will see that the cache-handler software is under the auspices of /caddy-server. It supports distributed caches. The cdp-cache is kind of abandoned. Lives on a less famous location. Not updated since April 8th. Requires an old version of Go and an old version of caddy. Even though it is much simpler, and the docs are much much better. My take away is that open source goes where the money is. Large companies that need distributed caches. Which is different from the needs of small companies, that just run on a single server. I see the same issue everywhere. The needs of big and small companies are different. Here is my article about the difference between Docker and bsd. "Docker is for big companies, Bastille BSD is for small companies and developers. " |
Just as a heads-up, building caddy is not that easy... To install xcaddy I had to use:
And I built caddy:
But just running the executable to get help:
From caddyserver/caddy#4118 I gather I have to use an older version of Go, perhaps... |
Yes, you have to use go 1.17 I submitted a read me pull request, and offered to make more edits, but have not heard back about the existing changes I made, so not much point investing a lot more effort into it. Hopefully eventually they will respond to it. |
For now, I managed to build this extension with Go v1.17 (MacOS). |
cdp-cache is upgraded (#67 ) so close this issue |
The text was updated successfully, but these errors were encountered: