fix(dev): disable IP seeding in dev as it does not work
This commit is contained in:
parent
1fbc1a5540
commit
1f1fe1f184
1 changed files with 18 additions and 16 deletions
|
|
@ -23,23 +23,25 @@ public function run(): void
|
||||||
'smtp_from_address' => 'hi@localhost.com',
|
'smtp_from_address' => 'hi@localhost.com',
|
||||||
'smtp_from_name' => 'Coolify',
|
'smtp_from_name' => 'Coolify',
|
||||||
]);
|
]);
|
||||||
try {
|
if (! isDev()) {
|
||||||
$ipv4 = Process::run('curl -4s https://ifconfig.io')->output();
|
try {
|
||||||
$ipv4 = trim($ipv4);
|
$ipv4 = Process::run('curl -4s https://ifconfig.io')->output();
|
||||||
$ipv4 = filter_var($ipv4, FILTER_VALIDATE_IP);
|
$ipv4 = trim($ipv4);
|
||||||
$settings = instanceSettings();
|
$ipv4 = filter_var($ipv4, FILTER_VALIDATE_IP);
|
||||||
if (is_null($settings->public_ipv4) && $ipv4) {
|
$settings = instanceSettings();
|
||||||
$settings->update(['public_ipv4' => $ipv4]);
|
if (is_null($settings->public_ipv4) && $ipv4) {
|
||||||
|
$settings->update(['public_ipv4' => $ipv4]);
|
||||||
|
}
|
||||||
|
$ipv6 = Process::run('curl -6s https://ifconfig.io')->output();
|
||||||
|
$ipv6 = trim($ipv6);
|
||||||
|
$ipv6 = filter_var($ipv6, FILTER_VALIDATE_IP);
|
||||||
|
$settings = instanceSettings();
|
||||||
|
if (is_null($settings->public_ipv6) && $ipv6) {
|
||||||
|
$settings->update(['public_ipv6' => $ipv6]);
|
||||||
|
}
|
||||||
|
} catch (\Throwable $e) {
|
||||||
|
echo "Error: {$e->getMessage()}\n";
|
||||||
}
|
}
|
||||||
$ipv6 = Process::run('curl -6s https://ifconfig.io')->output();
|
|
||||||
$ipv6 = trim($ipv6);
|
|
||||||
$ipv6 = filter_var($ipv6, FILTER_VALIDATE_IP);
|
|
||||||
$settings = instanceSettings();
|
|
||||||
if (is_null($settings->public_ipv6) && $ipv6) {
|
|
||||||
$settings->update(['public_ipv6' => $ipv6]);
|
|
||||||
}
|
|
||||||
} catch (\Throwable $e) {
|
|
||||||
echo "Error: {$e->getMessage()}\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue