mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 20:15:45 +00:00
fix: add 'is_literal' flag to shared environment variables for servers
This commit is contained in:
1 parent
99d22ae7d6
commit
510fb2256b
3 files changed
+9
-4
No files matched your search
+4
-2
@@ -21,13 +21,14 @@ return new class extends Migration
|
||||
->where('key', 'COOLIFY_SERVER_UUID')
|
||||
->exists();
|
||||
|
||||
if (!$uuidExists) {
|
||||
if (! $uuidExists) {
|
||||
DB::table('shared_environment_variables')->insert([
|
||||
'key' => 'COOLIFY_SERVER_UUID',
|
||||
'value' => $server->uuid,
|
||||
'type' => 'server',
|
||||
'server_id' => $server->id,
|
||||
'team_id' => $server->team_id,
|
||||
'is_literal' => true,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
@@ -40,13 +41,14 @@ return new class extends Migration
|
||||
->where('key', 'COOLIFY_SERVER_NAME')
|
||||
->exists();
|
||||
|
||||
if (!$nameExists) {
|
||||
if (! $nameExists) {
|
||||
DB::table('shared_environment_variables')->insert([
|
||||
'key' => 'COOLIFY_SERVER_NAME',
|
||||
'value' => $server->name,
|
||||
'type' => 'server',
|
||||
'server_id' => $server->id,
|
||||
'team_id' => $server->team_id,
|
||||
'is_literal' => true,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
@@ -44,6 +44,7 @@ class SharedEnvironmentVariableSeeder extends Seeder
|
||||
'team_id' => $server->team_id,
|
||||
], [
|
||||
'value' => $server->uuid,
|
||||
'is_literal' => true,
|
||||
]);
|
||||
|
||||
SharedEnvironmentVariable::firstOrCreate([
|
||||
@@ -53,6 +54,7 @@ class SharedEnvironmentVariableSeeder extends Seeder
|
||||
'team_id' => $server->team_id,
|
||||
], [
|
||||
'value' => $server->name,
|
||||
'is_literal' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user