Caddy as a release plugin

I haven’t really grasped how every component in waypoint works but so far I do understand that the release plugin basically just points to which deployment version of your application to expose the public. Seeing as Caddy Server can be dynamically configured via a REST API opened my eyes to the possibility of a Caddy release plugin that is very simple compared to the likes of kubernetes(services).

project = "example-nodejs"

app "example-nodejs" {}

  build {
    use "pack" {}
  }

  deploy { 
    use "docker" {}
  }

  release { 
    use "caddy" {}
  }
}

Is it to crazy/stupid or should try and write some code around it as I learn to write my own plugins?

Hi @rugwirobaker,

This sounds pretty sensible to me, at present the Kubernetes release plugin creates a K8s service. It should be pretty straightforward to create a drop-in replacement for this
which leverages the Caddy API.

For info on creating plugins please check out the docs: https://www.waypointproject.io/docs/extending-waypoint

The implementation for the Kubernetes plugin can be found here:

Shout out if we can help.

Nic

This is great I have started going through it. So far I have been able to build that gobuilder plugin. But I haven’t been able to build the main waypoint repository. Someone told earlier install go-bindata and I did but it still doesn’t work:

➜  waypoint git:(main) make bin
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./internal/assets/ceb/ceb ./cmd/waypoint-entrypoint
cd internal/assets && go-bindata -pkg assets -o prod.go -tags assetsembedded ./ceb
CGO_ENABLED=0 go build -ldflags "-X "github.com/hashicorp/waypoint/internal/version".GitCommit=$(git rev-parse --short HEAD)$(test -n "`git status --porcelain`" && echo "+CHANGES" || true) -X "github.com/hashicorp/waypoint/internal/version".GitDescribe=$(git describe --tags --always --match "v*")" -tags assetsembedded -o ./waypoint ./cmd/waypoint
# github.com/hashicorp/waypoint/builtin/docker
builtin/docker/builder.go:187:21: undefined: assets.AssetInfo
Makefile:14: recipe for target 'bin' failed
make: *** [bin] Error 2