mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-03 07:12:33 +00:00
feat: add configurable timeout for public database TCP proxy
Adds a per-database 'Proxy Timeout' setting for publicly exposed databases. The nginx stream proxy_timeout can now be configured in the UI, defaulting to 3600s (1 hour) instead of nginx's 10min default. Set to 0 for no timeout. Fixes #7743
This commit is contained in:
1 parent
78aea9a7ec
commit
30c1d9bbd0
28 files changed
+150
No files matched your search
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$tables = [
|
||||
'standalone_postgresqls',
|
||||
'standalone_mysqls',
|
||||
'standalone_mariadbs',
|
||||
'standalone_redis',
|
||||
'standalone_mongodbs',
|
||||
'standalone_clickhouses',
|
||||
'standalone_keydbs',
|
||||
'standalone_dragonflies',
|
||||
'service_databases',
|
||||
];
|
||||
|
||||
foreach ($tables as $table) {
|
||||
if (Schema::hasTable($table) && !Schema::hasColumn($table, 'public_port_timeout')) {
|
||||
Schema::table($table, function (Blueprint $table) {
|
||||
$table->integer('public_port_timeout')->nullable()->default(3600)->after('public_port');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
$tables = [
|
||||
'standalone_postgresqls',
|
||||
'standalone_mysqls',
|
||||
'standalone_mariadbs',
|
||||
'standalone_redis',
|
||||
'standalone_mongodbs',
|
||||
'standalone_clickhouses',
|
||||
'standalone_keydbs',
|
||||
'standalone_dragonflies',
|
||||
'service_databases',
|
||||
];
|
||||
|
||||
foreach ($tables as $table) {
|
||||
if (Schema::hasTable($table) && Schema::hasColumn($table, 'public_port_timeout')) {
|
||||
Schema::table($table, function (Blueprint $table) {
|
||||
$table->dropColumn('public_port_timeout');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user