alangecker / bigbluebutton-docker

merged into https://github.com/bigbluebutton/docker
GNU Lesser General Public License v3.0
99 stars 33 forks source link

template based generation of docker-compose.yml #71

Closed alangecker closed 3 years ago

alangecker commented 3 years ago

@trickert76 brought up (#42) concerns regarding the current way of conditionally combining multiple docker-compose.yml blocks which brings multiple disadvantages raised in https://github.com/alangecker/bigbluebutton-docker/issues/42#issuecomment-666287442

he/she worked already on a alternative way (#47) which uses cat to generate a single docker-compose.yml file.

I thought, that cating files together can't be the best way we can find so I start hereby a different approach:

missing:


closes #42 #47

trickert76 commented 3 years ago

I think, this is a good aproach. I don't know golang templates (coming from Ansible Jinja, Velocity). But at the end - it is a template and that is good and better way then the cat mechanism.

About the problem with ENABLE_COTURN without HTTPS. Either add the condition that coturn only works with the HTTPS_ENBALED flag or add a simple certbot container or let generate a self signed certificate only in that case inside the COTURN server. With Letsencrypt there must be a port 80 open and that is maybe the reason why somebody is not enabling HTTPS (because they use a different LB in front).

So - I'm waiting for the merge. ;-)

clawoflight commented 3 years ago

I like this as well, thank you very much for your effort :)

till commented 3 years ago

I think instead of using cat, you could do:

docker-compose -f first-compose.yml -f second-compose.yml up

... and it would merge for you. No need to combine the files, and maybe no need for a new templating language?

alangecker commented 3 years ago

@till chaining docker-compose.yml was our starting point and it is what is used right now ;) https://github.com/alangecker/bigbluebutton-docker/blob/v2.2.x/scripts/compose

but with having 7 compose files it would become quite a messy command, so I introduced this ./scripts/compose wrapper, which leads to new issues @trickert76 pointed out in #42

the golang templating language is already used in multiple places, so It would not be a new language added:

mod/core/web/bigbluebutton.properties
mod/core/web/turn-stun-servers.xml
mod/core/bbb-apps-akka/application.conf
mod/webhooks/config.yml
mod/recordings/bigbluebutton.yml
mod/html5/settings.yml
mod/freeswitch/conf/vars.xml.tmpl
mod/freeswitch/conf/autoload_configs/conference.conf.xml.tmpl
alangecker commented 3 years ago

Due to some merge conflicts, I recreated the commit and pushed in directly to v2.3.x with https://github.com/alangecker/bigbluebutton-docker/commit/16df9ab33482de33b9be17ec099f9c6c020c7308

so this is effectively finally merged :tada:! :)