diff --git a/app/config/variables.php b/app/config/variables.php index 5f3cd430e9..e726ca79dc 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -68,7 +68,7 @@ return [ 'default' => 'localhost', 'required' => true, 'question' => 'Enter a DNS A record hostname to serve as a CNAME for your custom domains.' . PHP_EOL . 'You can use the same value as used for the Appwrite hostname.', - 'filter' => '' + 'filter' => 'domainTarget' ], [ 'name' => '_APP_CONSOLE_WHITELIST_ROOT', diff --git a/app/tasks/install.php b/app/tasks/install.php index 6349a162fa..3519b58d0b 100644 --- a/app/tasks/install.php +++ b/app/tasks/install.php @@ -173,6 +173,16 @@ $cli if (empty($input[$var['name']])) { $input[$var['name']] = $var['default']; } + + if ($var['filter'] === 'domainTarget') { + if ($input[$var['name']] !== 'localhost') { + Console::warning("\nIf you haven't already done so, set the following record for {$input[$var['name']]} on your DNS provider:\n"); + $mask = "%-15.15s %-10.10s %-30.30s\n"; + printf($mask, "Type", "Name", "Value"); + printf($mask, "A or AAAA", "@", ""); + Console::warning("\nUse 'AAAA' if you're using an IPv6 address and 'A' if you're using an IPv4 address.\n"); + } + } } $templateForCompose = new View(__DIR__ . '/../views/install/compose.phtml');