feat: support non-TLD resolving server domains
All checks were successful
continuous-integration/drone/push Build is passing

See coop-cloud/organising#566
This commit is contained in:
decentral1se 2024-06-22 14:31:27 +02:00 committed by decentral1se
parent 6cd331ebd6
commit 938534f5ac
2 changed files with 11 additions and 4 deletions

View File

@ -193,7 +193,7 @@ var NewAppServerFlag = &cli.StringFlag{
var NoDomainChecks bool var NoDomainChecks bool
var NoDomainChecksFlag = &cli.BoolFlag{ var NoDomainChecksFlag = &cli.BoolFlag{
Name: "no-domain-checks, D", Name: "no-domain-checks, D",
Usage: "Disable app domain sanity checks", Usage: "Disable public DNS checks",
Destination: &NoDomainChecks, Destination: &NoDomainChecks,
} }

View File

@ -99,7 +99,7 @@ Abra uses the SSH command-line to discover connection details for your server.
It is advised to configure an entry per-host in your ~/.ssh/config for each It is advised to configure an entry per-host in your ~/.ssh/config for each
server. For example: server. For example:
Host example.com Host example.com example
Hostname example.com Hostname example.com
User exampleUser User exampleUser
Port 12345 Port 12345
@ -109,6 +109,10 @@ Abra can then load SSH connection details from this configuratiion with:
abra server add example.com abra server add example.com
Or using the name "example" which is not resolvable on the public Internet:
abra server add -D example
If "--local" is passed, then Abra assumes that the current local server is If "--local" is passed, then Abra assumes that the current local server is
intended as the target server. This is useful when you want to have your entire intended as the target server. This is useful when you want to have your entire
Co-op Cloud config located on the server itself, and not on your local Co-op Cloud config located on the server itself, and not on your local
@ -117,6 +121,7 @@ developer machine.
Flags: []cli.Flag{ Flags: []cli.Flag{
internal.DebugFlag, internal.DebugFlag,
internal.NoInputFlag, internal.NoInputFlag,
internal.NoDomainChecksFlag,
localFlag, localFlag,
}, },
Before: internal.SubCommandBefore, Before: internal.SubCommandBefore,
@ -150,8 +155,10 @@ developer machine.
return nil return nil
} }
if _, err := dns.EnsureIPv4(domainName); err != nil { if !internal.NoDomainChecks {
logrus.Fatal(err) if _, err := dns.EnsureIPv4(domainName); err != nil {
logrus.Fatal(err)
}
} }
if err := createServerDir(domainName); err != nil { if err := createServerDir(domainName); err != nil {