refactor: Internal HOSTNAME and DOMAINNAME configuration (#2280)

Better logical flow, handling and inline documentation.

Despite the verbosity, it's better to make this visible here for maintenance and debugging purposes than trying to dig through issue/PR or commit history for it.

* fix: Panic when HOSTNAME is misconfigured
* chore: Add more comment docs for maintainers
* tests(fix): Use `--domainname` not ENV `DOMAINNAME`

Co-authored-by: Casper <casperklein@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
Brennan Kinney 2021-11-16 10:50:45 +13:00 committed by GitHub
parent 30834eb250
commit 584577787a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 60 additions and 22 deletions

View file

@ -35,9 +35,9 @@ function setup_file() {
-e PERMIT_DOCKER=network \
-e DMS_DEBUG=0 \
-e ENABLE_SRS=1 \
-e SRS_DOMAINNAME=srs.my-domain.com \
-e DOMAINNAME=my-domain.com \
-h unknown.domain.tld \
-e SRS_DOMAINNAME='srs.my-domain.com' \
--domainname 'my-domain.com' \
--hostname 'mail' \
-t "${NAME}"
PRIVATE_CONFIG_FOUR="$(duplicate_config_for_container . mail_domainname)"
@ -47,14 +47,14 @@ function setup_file() {
-e PERMIT_DOCKER=network \
-e DMS_DEBUG=0 \
-e ENABLE_SRS=1 \
-e DOMAINNAME=my-domain.com \
-h unknown.domain.tld \
--domainname 'my-domain.com' \
--hostname 'mail' \
-t "${NAME}"
wait_for_smtp_port_in_container mail_override_hostname
wait_for_smtp_port_in_container mail_non_subdomain_hostname
wait_for_smtp_port_in_container mail_srs_domainname
wait_for_smtp_port_in_container mail_domainname