updates
This commit is contained in:
parent
1584a48b11
commit
35b9ce4ff0
@ -13,6 +13,7 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('instance_settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('public_ip_address')->nullable();
|
||||
$table->string('fqdn')->nullable();
|
||||
$table->string('wildcard_domain')->nullable();
|
||||
$table->string('default_redirect_404')->nullable();
|
||||
|
@ -13,6 +13,7 @@ use App\Models\Server;
|
||||
use App\Models\StandaloneDocker;
|
||||
use App\Models\Team;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Process;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class ProductionSeeder extends Seeder
|
||||
@ -105,5 +106,16 @@ class ProductionSeeder extends Seeder
|
||||
'server_id' => 0,
|
||||
]);
|
||||
}
|
||||
try {
|
||||
$ip = Process::run('curl -4s https://ifconfig.io')->output;
|
||||
$ip = trim($ip);
|
||||
$ip = filter_var($ip, FILTER_VALIDATE_IP);
|
||||
$settings = InstanceSettings::get();
|
||||
if ($settings->public_ip_address !== $ip) {
|
||||
$settings->update(['public_ip_address' => $ip]);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
echo "Error: {$e->getMessage()}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,5 @@
|
||||
<div class="stat-value">{{ $resources }}</div>
|
||||
<div class="stat-desc">Applications, databases, etc...</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</x-layout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user