Open Silur opened 1 year ago
Hi @Silur, thank you for opening this issue. Did you consider using wildcards ? By looking at the documentation about server names I also find out that you can use regex inside server names. Right now sadly regex for server names won't work in the version 1.5.0 because of the regex but in the next release you will be able to use them.
It's not recommended but you can try this out by compiling the staging branch.
I think we should treat that special case in the next major release.
Here is what comes to my mind : add a special setting like AUTOCONF_MULTISITE=yes/no
and if set to yes
to a special service (as label) then we process the labels in multisite mode. The same way you describe @Silur but we need that switch in case someone wants to have multiple domains for the same service and don't want the multisite feature.
Anyway we also need to provide a way to add extra configs without containers (and with hot reload).
Docker autoconf mode (as of 1.5.0) currently does not support assigning multisite config to the labels section. <ore precisely, the nginx config will pick the SERVER_NAME up but not the relevant
bunkerweb.mysubdomain.example.com_AUTO_LETS_ENCRYPT
etc entriesCurrently if one container has multiple exposed ports that a reverse proxy has to separately attach in autoconf mode, we have to fire up two separate instances of this container.
It'd be if autoconf mode would also respect `-"bunkerweb.SERVER_NAME=app1.example.com app2.example.com" and then the relevant subdomain confs as seen in https://docs.bunkerweb.io/1.5.0/concepts/#multisite-mode