3 ms·
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. A
by eric4smith 4y ago
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 members?
I don’t get that part.
- mholt 4y ago... I don't get it, why not just use the Caddyfile yourself? Lots of people need the JSON config. But if it doesn't help you, you don't even have to know or think about JSON when you use the Caddyfile.
- francislavoie 4y agoJSON 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.
- humblepie 4y agoLoved 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.
- mholt 4y agoGlad you like it! I spent months designing the Caddy config and how the JSON structure would look/work. The docs pages took longer to make than the core of Caddy 2 did, so I'm glad you like those too and find them helpful. That performance fix was a breath of fresh air for me too. Anyway, nice to hear from another happy JSON consumer. I know several large companies using the JSON exclusively as well.