fix: no domain checks if no DOMAIN=... configured

Closes coop-cloud/organising#353
This commit is contained in:
decentral1se 2023-01-23 01:11:07 +01:00
parent 54646650c7
commit c72462e0b6
Signed by untrusted user: decentral1se
GPG Key ID: 03789458B3D0C410

View File

@ -140,9 +140,13 @@ func DeployAction(c *cli.Context) error {
}
if !NoDomainChecks {
domainName := app.Env["DOMAIN"]
if _, err = dns.EnsureDomainsResolveSameIPv4(domainName, app.Server); err != nil {
logrus.Fatal(err)
domainName, ok := app.Env["DOMAIN"]
if ok {
if _, err = dns.EnsureDomainsResolveSameIPv4(domainName, app.Server); err != nil {
logrus.Fatal(err)
}
} else {
logrus.Warn("skipping domain checks as no DOMAIN=... configured for app")
}
} else {
logrus.Warn("skipping domain checks as requested")