Automated Caddy reverse proxy for docker containers


(Nikita Sobolev) #1

I was using Caddy for almost two month now. It proved to be awesome and super simple.
But I was lacking support for dynamic docker (or swarm) backend. So, I have created a tool called caddy-gen.

It is a standalone image which could be included into your docker-compose file. It consists of three main parts:

  • Caddy obviously
  • docker-gen to listen to docker events and regenerate configuration based on these events
  • forego to handle two processes in the same container

Check it out: https://github.com/wemake-services/caddy-gen

It is still in its early days. So. Any feedback is welcomed!


(Matthew Fay) #2

I did something remarkably similar, seems like we have similar taste in naming conventions!

https://hub.docker.com/r/whitestrake/caddy-gen/

I think your template is much neater than mine, though. My version is pretty opinionated towards my own requirements.


(Nikita Sobolev) #3

Your looks good as well. I will definitely take some ideas!
For example, from the template file. go template syntax is a big struggle for me.


(system) #4

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.