Closed sttts closed 9 years ago
Wow, that's great! This actually resolves a few feature request and leave some flexibility to the template customization.
I'm going to test it later today before merging.
Sure, if you find any issue, just tell me.
Actually I am realizing right now that with this patch and a bit of magic in the template one can implement a complete service discovery infrastructure using bamboo, haproxy and proper values in the app definitions. This would allow to get rid of progrium/registrator and consul in my case. Crazy.
That's awesome to know. :)
one can implement a complete service discovery infrastructure using bamboo, haproxy and proper values in the app definitions.
That was kind of the plan all along ;)
The first patch adds the $app.Env map in the template environment.
This mechanism is used in the second patch to add TCP support by setting the BAMBOO_TCP_PORT variable in the application definition. This leads to a "mode tcp" section for that app in the haproxy configuration with the value of BAMBOO_TCP_PORT as the port to listen on.