This commit is contained in:
Andras Bacsai
2023-03-28 15:47:37 +02:00
parent 0b248e9be4
commit 4df66ebf00
24 changed files with 408 additions and 25 deletions

View File

@@ -0,0 +1,41 @@
<?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('coolify_instance_settings', function (Blueprint $table) {
$table->id();
$table->string('fqdn')->nullable();
$table->string('wildcard_domain')->nullable();
$table->string('redirect_url')->nullable();
// $table->string('preview_domain_separator')->default('.');
$table->integer('public_port_min')->default(9000);
$table->integer('public_port_max')->default(9100);
// $table->string('custom_dns_servers')->default('1.1.1.1,8.8.8.8');
$table->boolean('do_not_track')->default(false);
$table->boolean('is_auto_update_enabled')->default(true);
// $table->boolean('is_dns_check_enabled')->default(true);
$table->boolean('is_registration_enabled')->default(true);
$table->boolean('is_https_forced')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('coolify_instance_settings');
}
};

View File

@@ -16,8 +16,47 @@ return new class extends Migration
$table->string('uuid')->unique();
$table->string('name');
$table->string('fqdn')->unique()->nullable();
$table->string('config_hash')->nullable();
$table->string('git_repository');
$table->string('git_branch');
$table->string('git_commit_sha')->nullable();
$table->string('docker_registry_image_name')->nullable();
$table->string('docker_registry_image_tag')->nullable();
$table->string('build_pack');
$table->string('base_image')->nullable();
$table->string('build_image')->nullable();
$table->string('install_command')->nullable();
$table->string('build_command')->nullable();
$table->string('start_command')->nullable();
$table->string('ports_exposes');
$table->string('ports_mappings')->nullable();
$table->string('base_directory')->default('/');
$table->string('publish_directory')->nullable();
$table->string('health_check_path')->nullable();
$table->string('health_check_port')->nullable();
$table->string('health_check_host')->default('localhost');
$table->string('health_check_method')->default('GET');
$table->integer('health_check_return_code')->default(200);
$table->string('health_check_scheme')->default('http');
$table->string('health_check_response_text')->nullable();
$table->integer('health_check_interval')->default(5);
$table->integer('health_check_timeout')->default(5);
$table->integer('health_check_retries')->default(10);
$table->integer('health_check_start_period')->default(5);
$table->string('status')->default('killed');
$table->morphs('destination');
$table->morphs('source');
$table->foreignId('environment_id');
$table->timestamps();

View File

@@ -0,0 +1,37 @@
<?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('application_settings', function (Blueprint $table) {
$table->id();
$table->boolean('is_git_submodules_allowed')->default(true);
$table->boolean('is_git_lfs_allowed')->default(true);
$table->boolean('is_auto_deploy')->default(true);
$table->boolean('is_dual_cert')->default(false);
$table->boolean('is_debug')->default(false);
$table->boolean('is_previews')->default(false);
$table->boolean('is_bot')->default(false);
$table->boolean('is_custom_ssl')->default(false);
$table->boolean('is_http2')->default(false);
$table->foreignId('application_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('application_settings');
}
};

View File

@@ -0,0 +1,30 @@
<?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('deployments', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->morphs('type');
$table->foreignId('activity_log_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('deployments');
}
};