Add support for CNAME in public domain setup
We often use internal domains like *.PROJECT.lakedrops.com
for SaaS projects, where the *
gets replaced with a short name for the customer project. Only when we go live with the project, do we change that domain to a real one from the client. That meant so far that the customer had to set the DNS of their domain to the IP on our server.
The problem with that: they have to change DNS every time when we have to move the site to a different server.
Solution: keep the internal domain in place and let the customer configure the CNAME DNS record so that their real domain points to our internal domain. That way, we can independently move installations to different servers by updating the DNS of our internal domain.
Follow-up problem: extra domains like for mailpit, pma or others won't work as they just add a prefic to the domain. But that doesn't work with customer's real domain, only with our internal domains.
Solution: Keep the internal domain for all settings and only use an optional extra publicdomain
setting for the docker-compose file.