Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

updates

Andras Bacsai7ce31c77c5c5
diff --git a/database/migrations/2023_03_20_112814_create_instance_settings_table.php b/database/migrations/2023_03_20_112814_create_instance_settings_table.php
index 8d30c2b2c1..c0fc8a6fb4 100644
--- a/database/migrations/2023_03_20_112814_create_instance_settings_table.php
+++ b/database/migrations/2023_03_20_112814_create_instance_settings_table.php
@@ -13,7 +13,8 @@ return new class extends Migration
{
Schema::create('instance_settings', function (Blueprint $table) {
$table->id();
- $table->string('public_ip_address')->nullable();
+ $table->string('public_ipv4')->nullable();
+ $table->string('public_ipv6')->nullable();
$table->string('fqdn')->nullable();
$table->string('wildcard_domain')->nullable();
$table->string('default_redirect_404')->nullable();
diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.php
index 50aa2fefa0..4e4bfaf8ca 100644
--- a/database/seeders/ProductionSeeder.php
+++ b/database/seeders/ProductionSeeder.php
@@ -107,12 +107,19 @@ class ProductionSeeder extends Seeder
]);
}
try {
- $ip = Process::run('curl -4s https://ifconfig.io')->output;
- $ip = trim($ip);
- $ip = filter_var($ip, FILTER_VALIDATE_IP);
+ $ipv4 = Process::run('curl -4s https://ifconfig.io')->output;
+ $ipv4 = trim($ipv4);
+ $ipv4 = filter_var($ipv4, FILTER_VALIDATE_IP);
$settings = InstanceSettings::get();
- if ($settings->public_ip_address !== $ip) {
- $settings->update(['public_ip_address' => $ip]);
+ if (is_null($settings->public_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::get();
+ if (is_null($settings->public_ipv6)) {
+ $settings->update(['public_ipv6' => $ipv6]);
}
} catch (\Exception $e) {
echo "Error: {$e->getMessage()}\n";