alangecker / bigbluebutton-docker

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

docker-compose syntax error with Nginx container #81

Closed trickert76 closed 3 years ago

trickert76 commented 3 years ago

Last night I've got an error after upgrading the BBB host. I'm not sure, but I think with docker-compose 1.27.4 there is an issue with the nginx-service definition.

# ./scripts/compose up -d
Creating network "si00066_default" with the default driver
Creating network "si00066_bbb-net" with the default driver
Creating si00066_mongodb_1     ... done
Creating si00066_freeswitch_1  ... done
Creating si00066_redis_1       ... done
Creating si00066_https_proxy_1 ... done
Creating si00066_postgres_1    ... done
Creating si00066_greenlight_1  ... done
Creating si00066_coturn_1      ... done
Creating si00066_kurento_1     ... done
Creating si00066_core_1        ... done
Creating si00066_etherpad_1    ... done
Creating si00066_webhooks_1    ... done
Creating si00066_periodic_1    ... done
Creating si00066_html5_1       ... done
Creating si00066_webrtc-sfu_1  ... done
Creating si00066_nginx_1       ... 

ERROR: for si00066_nginx_1  "host" network_mode is incompatible with port_bindings

ERROR: for nginx  "host" network_mode is incompatible with port_bindings

and that is correct for me, because in a network_mode: host mode there can't be a port binding like 8080:80 because the container uses the concrete network device directly without a proxy. I assume this is because now I've got docker-compose v.1.27.4 last night. But it should be fixed. Because there is port binding to an unusual port - I would expect that, network_mode: host is wrong here. Because this would be done via https-Proxy.

trickert76 commented 3 years ago

But the funny part is - when I comment out the network_mode: host from nginx service, the HTTPS proxy can't reach the backend. When I comment out the ports: 8080:80 mapping it works as expected. That is strange.

Also the nginx service is configured to listen on 8080 - but the port mapping says something different (external-port:internal-port or am I wrong?)

trickert76 commented 3 years ago

But at the end - what is the reason for using network_mode: host in the nginx: host. In my understand of the nginx config it is still just a HTTP service that forwards requests to some other containers via HTTP. The docker-proxy should be able to handle that request - or?

alangecker commented 3 years ago

yeps, that port forward is not used anyway!

As far as I can remember I used the network_mode: host instead of a port forward due to some IPv6 issues, where quite some modifications on the host must be made for get docker with IPv6 running probably. With network_mode: host we don't rely on docker for forwarding the ports on IPv6 as well.

I just made a commit where the port forward gets removed. should be released soon ;)

alangecker commented 3 years ago

should be resolved by our latest release :)