Merge remote-tracking branch 'origin/v4' into ijpatricio-wip-4
# Conflicts: # bootstrap/helpers.php # docker/dev/supervisord.conf
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?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
|
||||
{
|
||||
Schema::create('server_settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->boolean('is_build_server')->default(false);
|
||||
|
||||
$table->foreignId('server_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('server_settings');
|
||||
}
|
||||
};
|
@@ -52,7 +52,7 @@ return new class extends Migration
|
||||
$table->integer('health_check_retries')->default(10);
|
||||
$table->integer('health_check_start_period')->default(5);
|
||||
|
||||
$table->string('status')->default('killed');
|
||||
$table->string('status')->default('exited');
|
||||
|
||||
$table->morphs('destination');
|
||||
$table->morphs('source');
|
||||
|
@@ -25,7 +25,7 @@ class ApplicationSeeder extends Seeder
|
||||
$github_private_source = GithubApp::find(2);
|
||||
Application::create([
|
||||
'id' => 1,
|
||||
'name' => 'My first application',
|
||||
'name' => 'Public application (from GitHub)',
|
||||
'git_repository' => 'coollabsio/coolify-examples',
|
||||
'git_branch' => 'nodejs-fastify',
|
||||
'build_pack' => 'nixpacks',
|
||||
@@ -39,7 +39,7 @@ class ApplicationSeeder extends Seeder
|
||||
]);
|
||||
Application::create([
|
||||
'id' => 2,
|
||||
'name' => 'My second application',
|
||||
'name' => 'Private application (through GitHub App)',
|
||||
'git_repository' => 'coollabsio/nodejs-example',
|
||||
'git_branch' => 'main',
|
||||
'build_pack' => 'nixpacks',
|
||||
|
@@ -13,12 +13,12 @@ class DBSeeder extends Seeder
|
||||
{
|
||||
$environment_1 = Environment::find(1);
|
||||
$standalone_docker_1 = StandaloneDocker::find(1);
|
||||
Database::create([
|
||||
'id' => 1,
|
||||
'name'=> "My first database",
|
||||
'environment_id' => $environment_1->id,
|
||||
'destination_id' => $standalone_docker_1->id,
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
]);
|
||||
// Database::create([
|
||||
// 'id' => 1,
|
||||
// 'name'=> "My first database",
|
||||
// 'environment_id' => $environment_1->id,
|
||||
// 'destination_id' => $standalone_docker_1->id,
|
||||
// 'destination_type' => StandaloneDocker::class,
|
||||
// ]);
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ class DatabaseSeeder extends Seeder
|
||||
TeamSeeder::class,
|
||||
PrivateKeySeeder::class,
|
||||
ServerSeeder::class,
|
||||
ServerSettingSeeder::class,
|
||||
ProjectSeeder::class,
|
||||
ProjectSettingSeeder::class,
|
||||
EnvironmentSeeder::class,
|
||||
|
25
database/seeders/ServerSettingSeeder.php
Normal file
25
database/seeders/ServerSettingSeeder.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Server;
|
||||
use App\Models\Team;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ServerSettingSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$server_1 = Server::find(1)->load(['settings']);
|
||||
$server_1->settings->is_build_server = true;
|
||||
$server_1->settings->save();
|
||||
|
||||
$server_2 = Server::find(2)->load(['settings']);
|
||||
$server_2->settings->is_build_server = true;
|
||||
$server_2->settings->save();
|
||||
|
||||
}
|
||||
}
|
@@ -16,12 +16,12 @@ class ServiceSeeder extends Seeder
|
||||
{
|
||||
$environment_1 = Environment::find(1);
|
||||
$standalone_docker_1 = StandaloneDocker::find(1);
|
||||
Service::create([
|
||||
'id' => 1,
|
||||
'name'=> "My first service",
|
||||
'environment_id' => $environment_1->id,
|
||||
'destination_id' => $standalone_docker_1->id,
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
]);
|
||||
// Service::create([
|
||||
// 'id' => 1,
|
||||
// 'name'=> "My first service",
|
||||
// 'environment_id' => $environment_1->id,
|
||||
// 'destination_id' => $standalone_docker_1->id,
|
||||
// 'destination_type' => StandaloneDocker::class,
|
||||
// ]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user