byjg / docker-easy-haproxy

Discover services and create dynamically the haproxy.cfg based on the labels defined in docker containers or from a simple static Yaml
MIT License
55 stars 12 forks source link

Organizing code to refactory labels #16

Closed byjg closed 2 years ago

byjg commented 2 years ago

This PR inverts the label pattern.

we have

And it will become:

josegonzalez commented 2 years ago

Could definitions be dynamic now that they are basically dictionaries? Basically, is easyhaproxy.definitions necessary still?

byjg commented 2 years ago

Yeah, I thought that too. It becomes unnecessary, but it will involve some refactory. Let me think, 99% sure I'll remove it, I just need to see how to implement it in the code.

byjg commented 2 years ago

I found a way to implement the definitions dynamically. So, there Is no need to use easyhaproxy.definitions anymore.

josegonzalez commented 2 years ago

This is great! I can probably include this in the next dokku release if this and the other mr are merged this weekend or sometime Monday :)