0
0
forked from toolshed/abra

feat: no domain checks flag

See coop-cloud/organising#281.
This commit is contained in:
2021-12-21 23:57:20 +01:00
parent e9b4541c91
commit b72bad955a
4 changed files with 22 additions and 7 deletions

View File

@ -116,14 +116,18 @@ func DeployAction(c *cli.Context) error {
logrus.Fatal(err)
}
domainName := app.Env["DOMAIN"]
ipv4, err := dns.EnsureIPv4(domainName)
if err != nil || ipv4 == "" {
logrus.Fatalf("could not find an IP address assigned to %s?", domainName)
}
if !NoDomainChecks {
domainName := app.Env["DOMAIN"]
ipv4, err := dns.EnsureIPv4(domainName)
if err != nil || ipv4 == "" {
logrus.Fatalf("could not find an IP address assigned to %s?", domainName)
}
if _, err = dns.EnsureDomainsResolveSameIPv4(domainName, app.Server); err != nil {
logrus.Fatal(err)
if _, err = dns.EnsureDomainsResolveSameIPv4(domainName, app.Server); err != nil {
logrus.Fatal(err)
}
} else {
logrus.Warn("skipping domain checks as requested")
}
if err := stack.RunDeploy(cl, deployOpts, compose, app.Env["TYPE"]); err != nil {