Closed NoSpread closed 3 weeks ago
I have solved this issue by including a custom nginx config.
Hello @NoSpread,
I don't know if it's a common case or a really specific one. Can you share more information about your use case ?
@NoSpread bump
I am sorry for not replying, kinda completely forgot about it.
Some of my webservices have to run on a specific port and cannot be exposed over port 443 or 80.
Example:
Client connects not only via port 80/443 but also via 1337 (as an example).
When I started to learn about Bunker, I did not find a way to set this in the configuration. So I just wrote my own config and included it in nginx. Also there was no way to set client side SSL certificates via the compose config. But when I found out that I could include all this with my own config in Bunker, it was not a big problem anymore.
I just hoped to have an option in the config to change the port per service or per subdomain, like it is possible with other options. It's just a very specific use case and with the ability to include custom nginx configs it's not really needed. Since if you have something really specific like this, you could just add it urself with a nginx config instead of needing an option in the compose file.
What's needed and why ? Unfortunately, due to the historical nature of the project, I cannot share all endpoints on port 80. This is also not possible under another sub-domain. So is it possible to also assign a dedicated port on a host to an endpoint?
So than for example you can customize the environment variables like this:
Implementations ideas (optional) This should be possible by simply creating another server block in the nginx config, and then assigning it to the 2nd endpoint. The implementation should work similar to the multiple reverse proxy configurations.