mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 00:17:16 +00:00
Merge remote-tracking branch 'origin/next' into pr-7764-shadow/add-shared-server-env
This commit is contained in:
commit
cb97a18a78
767 files changed
+61894
-15664
No files matched your search
@@ -4,6 +4,7 @@ namespace Database\Seeders;
|
||||
|
||||
use App\Models\Application;
|
||||
use App\Models\GithubApp;
|
||||
use App\Models\GitlabApp;
|
||||
use App\Models\StandaloneDocker;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
@@ -21,7 +22,7 @@ class ApplicationSeeder extends Seeder
|
||||
'git_repository' => 'coollabsio/coolify-examples',
|
||||
'git_branch' => 'v4.x',
|
||||
'base_directory' => '/docker-compose',
|
||||
'docker_compose_location' => 'docker-compose-test.yaml',
|
||||
'docker_compose_location' => '/docker-compose-test.yaml',
|
||||
'build_pack' => 'dockercompose',
|
||||
'ports_exposes' => '80',
|
||||
'environment_id' => 1,
|
||||
@@ -98,5 +99,51 @@ CMD ["nginx", "-g", "daemon off;"]
|
||||
CMD ["sh", "-c", "echo Crashing in 5 seconds... && sleep 5 && exit 1"]
|
||||
',
|
||||
]);
|
||||
Application::create([
|
||||
'uuid' => 'github-deploy-key',
|
||||
'name' => 'GitHub Deploy Key Example',
|
||||
'fqdn' => 'http://github-deploy-key.127.0.0.1.sslip.io',
|
||||
'git_repository' => 'git@github.com:coollabsio/coolify-examples-deploy-key.git',
|
||||
'git_branch' => 'main',
|
||||
'build_pack' => 'nixpacks',
|
||||
'ports_exposes' => '80',
|
||||
'environment_id' => 1,
|
||||
'destination_id' => 0,
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
'source_id' => 0,
|
||||
'source_type' => GithubApp::class,
|
||||
'private_key_id' => 1,
|
||||
]);
|
||||
Application::create([
|
||||
'uuid' => 'gitlab-deploy-key',
|
||||
'name' => 'GitLab Deploy Key Example',
|
||||
'fqdn' => 'http://gitlab-deploy-key.127.0.0.1.sslip.io',
|
||||
'git_repository' => 'git@gitlab.com:coollabsio/php-example.git',
|
||||
'git_branch' => 'main',
|
||||
'build_pack' => 'nixpacks',
|
||||
'ports_exposes' => '80',
|
||||
'environment_id' => 1,
|
||||
'destination_id' => 0,
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
'source_id' => 1,
|
||||
'source_type' => GitlabApp::class,
|
||||
'private_key_id' => 1,
|
||||
]);
|
||||
Application::create([
|
||||
'uuid' => 'gitlab-public-example',
|
||||
'name' => 'GitLab Public Example',
|
||||
'fqdn' => 'http://gitlab-public.127.0.0.1.sslip.io',
|
||||
'git_repository' => 'https://gitlab.com/andrasbacsai/coolify-examples.git',
|
||||
'base_directory' => '/astro/static',
|
||||
'publish_directory' => '/dist',
|
||||
'git_branch' => 'main',
|
||||
'build_pack' => 'nixpacks',
|
||||
'ports_exposes' => '80',
|
||||
'environment_id' => 1,
|
||||
'destination_id' => 0,
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
'source_id' => 1,
|
||||
'source_type' => GitlabApp::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -15,5 +15,12 @@ class ApplicationSettingsSeeder extends Seeder
|
||||
$application_1 = Application::find(1)->load(['settings']);
|
||||
$application_1->settings->is_debug_enabled = false;
|
||||
$application_1->settings->save();
|
||||
|
||||
$gitlabPublic = Application::where('uuid', 'gitlab-public-example')->first();
|
||||
if ($gitlabPublic) {
|
||||
$gitlabPublic->load(['settings']);
|
||||
$gitlabPublic->settings->is_static = true;
|
||||
$gitlabPublic->settings->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,12 +26,14 @@ class CaSslCertSeeder extends Seeder
|
||||
}
|
||||
$caCertPath = config('constants.coolify.base_config_path').'/ssl/';
|
||||
|
||||
$base64Cert = base64_encode($caCert->ssl_certificate);
|
||||
|
||||
$commands = collect([
|
||||
"mkdir -p $caCertPath",
|
||||
"chown -R 9999:root $caCertPath",
|
||||
"chmod -R 700 $caCertPath",
|
||||
"rm -rf $caCertPath/coolify-ca.crt",
|
||||
"echo '{$caCert->ssl_certificate}' > $caCertPath/coolify-ca.crt",
|
||||
"echo '{$base64Cert}' | base64 -d | tee $caCertPath/coolify-ca.crt > /dev/null",
|
||||
"chmod 644 $caCertPath/coolify-ca.crt",
|
||||
]);
|
||||
|
||||
|
||||
@@ -45,12 +45,13 @@ class RootUserSeeder extends Seeder
|
||||
}
|
||||
|
||||
try {
|
||||
User::create([
|
||||
$user = (new User)->forceFill([
|
||||
'id' => 0,
|
||||
'name' => env('ROOT_USERNAME', 'Root User'),
|
||||
'email' => env('ROOT_USER_EMAIL'),
|
||||
'password' => Hash::make(env('ROOT_USER_PASSWORD')),
|
||||
]);
|
||||
$user->save();
|
||||
echo "\n SUCCESS Root user created successfully.\n\n";
|
||||
} catch (\Exception $e) {
|
||||
echo "\n ERROR Failed to create root user: {$e->getMessage()}\n\n";
|
||||
|
||||
Reference in new issue
Block a user