caddyserver / cue-adapter

CUE config adapter for Caddy
13 stars 4 forks source link

Little bit more documentation? #1

Open StevenACoffman opened 4 years ago

StevenACoffman commented 4 years ago
mholt commented 4 years ago

Hi, yeah -- sorry. Just whipped it up real quick. Docs will improve!

To answer your questions quickly though:

1 and 2. You can use xcaddy build to plug it in and get a caddy binary with it plugged in. Then use the adapter like any other adapter: caddy [run|start] --config caddy.cue --adapter cue

  1. Unfortunately no, I don't actually know the Cue language 😅 I think @Mohammed90 has a schema he was working on (but maintaining that might be a bit burdensome for anyone 😬 ) -- basically, any cue document that translates to Caddy JSON should do the trick.
gedw99 commented 2 years ago

Is this active @mholt

i started using CueLang recently as it’s quite a useful way for mass management infrastructure

mholt commented 2 years ago

I don't use CUE personally, I just made this to demonstrate config adapters. It's pretty simple though, can't imagine too much maintenance is needed. Feel free to submit PRs if necessary!

StevenACoffman commented 2 years ago

@mohammed90 I hunted around a bit and I couldn't find your CUE schema. Is that public somewhere?

gedw99 commented 2 years ago

BTW you can build a GUI off the caddy config with Cue.

For example kubevela is using Cue to enable K8 and Terraform based management, and it has a GUI that is generated from the Cue Defintiation. https://kubevela.io/docs/platform-engineers/openapi-v3-json-schema#render-form

The more i use Cue the more i see it solving many transient problems with IT systems.

--

I woudl really love to get Cue working with Caddy, as Caddy is so nice and light.

mohammed90 commented 2 years ago

The draft schema is in PR #2. I haven't touched CUE since then so I'm not sure if any has changed. Help is appreciated! I'm swamped right now.

gedw99 commented 2 years ago

thanks @mohammed90

I am also swamped too. I will try to swing back onto this if someone else does not pick it up in the meantime. I really want to use cue with caddy !