fix: ensure ipv4 is present for app deploys
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
See coop-cloud/organising#227.
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
"coopcloud.tech/abra/pkg/catalogue"
|
||||
"coopcloud.tech/abra/pkg/client"
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"coopcloud.tech/abra/pkg/dns"
|
||||
"coopcloud.tech/abra/pkg/recipe"
|
||||
"coopcloud.tech/abra/pkg/upstream/stack"
|
||||
"github.com/AlecAivazis/survey/v2"
|
||||
@ -107,6 +108,12 @@ 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 err := stack.RunDeploy(cl, deployOpts, compose); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user