Live data from Hacker News

Show HN: Caddy v2.5.0

github.com

81–90 of 115 posts

Re: Show HN: Caddy v2.5.0

#82
post #57
post #37

Earlier quoted context omitted.

Would you mind sharing a (redacted if you like) copy of your config file in a Gist? Purely out of curiosity - your setup sounds really neat.

Sure, here's a redacted example: https://gist.github.com/lxgr/303b1a3cd87005edb43b91545c5306b... I unfortunately can't remember if there is some header/footer I'm omitting here – this file is managed by Ansible for my setup, but I believe it should effectively be the full Caddyfile.

That's really useful, thanks!

Re: Show HN: Caddy v2.5.0

#83
post #76

I wish Caddy went all in on the caddyfile and dumped the JSON. The meagre examples are split between the two formats, it’s tough trying to figure out how to do something that’s not straightforward. Even worse when you find out some config isn’t supported by caddyfile and have to export to a giant JSON mess, I look at the result and think this is not what I signed up for.

JSON will always be the underlying config. The reason is that it's a 1:1 map to the Go structs. Also, plenty of users appreciate being able to change their config programmatically via the admin API.

We're doing our best with the Caddyfile to cover every usecase. If there's something you're struggling with, open an issue if it's clearly missing, or ask on the forums, and we'll get you sorted.

Re: Show HN: Caddy v2.5.0

#84

Love caddy. We use it 100% on a whole bunch of servers and products. It’s the only tool that can do what it does. But that JSON config file? It’s a mistake. And I’m Being charitable and nice here. Especially the part where there is an api to update the JSON file. Jesus Christ Matt. Just use the caddyfile already. It’s easy, easy to read by everyone. Why make a config file hard to grok or follow by multiple team membe…

JSON is way easier to work with for "machines". The Caddyfile is a user-facing layer on top of that. The Caddyfile doesn't map as nicely to something usable at runtime. That was the entire point of the Caddy v2 rewrite; the v1 Caddyfile was inflexible and was turning into spaghetti.

Like Matt said, I don't understand the problem here. Just use the Caddyfile. What problem do you have with it specifically? If there's a feature you're missing or aren't sure how to use, open an issue or ask for help on the forums.

Re: Show HN: Caddy v2.5.0

#86
post #39
post #31

I was expecting this to be posted by mholt. :) I use Caddy in my production systems with one exception, websockets. Yes it works, yes it is easier to configure compared to nginx. But there is this one bug that I can't really put my finger on that is hard to debug and create an issue for. Under high load, it seems there are messages that are dropped and then the connection gets lost. It even affects the origin host be…

Can you open an issue with more details? I don't think this has been reported before. So that's why it hasn't been fixed yet. But we'd like to look into it.

Will do, thanks. It has just been this phantom issue that I haven't had a chance to compile enough convincing evidence to open an issue with.

Re: Show HN: Caddy v2.5.0

#87

Love caddy. We use it 100% on a whole bunch of servers and products. It’s the only tool that can do what it does. But that JSON config file? It’s a mistake. And I’m Being charitable and nice here. Especially the part where there is an api to update the JSON file. Jesus Christ Matt. Just use the caddyfile already. It’s easy, easy to read by everyone. Why make a config file hard to grok or follow by multiple team membe…

JSON is way easier to work with for "machines". The Caddyfile is a user-facing layer on top of that. The Caddyfile doesn't map as nicely to something usable at runtime. That was the entire point of the Caddy v2 rewrite; the v1 Caddyfile was inflexible and was turning into spaghetti. Like Matt said, I don't understand the problem here. Just use the Caddyfile. What problem do you have with it specifically? If there's a…

Loved the JSON file. I was a newcomer to Caddy and started using it when v2 just came out. The JSON config is really simple to write--as long as you have a huge screen :) Never really bothered with the Caddyfile syntax.

Also thanks for fixing the slow JSON schema docs pages, really helped a lot.

Re: Show HN: Caddy v2.5.0

#89
post #66

After more than 10 year nginx, I switched to Caddy and never regretted a moment.

Hey, as a nginx user for many many years, I don't understand why would I want to switch. Can you please give a few examples why it made sense for you? Especially with kubernetes environment I have a hard time trying to justify this.

In my experience Caddy is easier to work with on small projects. Easy to setup tls and routing and lets you focus on the project itself. On more advanced and performance sensitive use cases I still prefer HAProxy.
Post reply on HN