An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fixes
Andras Bacsaif766600fd85f
diff --git a/app/Http/Livewire/Project/Application/Deploy.php b/app/Http/Livewire/Project/Application/Deploy.phpindex a935b2ad8d..68c0a343e7 100644--- a/app/Http/Livewire/Project/Application/Deploy.php+++ b/app/Http/Livewire/Project/Application/Deploy.php@@ -53,6 +53,8 @@ class Deploy extends Componentpublic function stop(){- dispatch(new ContainerStopJob($this->application->id, $this->destination->server));+ instant_remote_process(["docker rm -f {$this->application->uuid}"], $this->application->destination->server);+ $this->application->status = get_container_status(server: $this->application->destination->server, container_id: $this->application->uuid);+ $this->application->save();}}diff --git a/app/Http/Livewire/Project/Application/Status.php b/app/Http/Livewire/Project/Application/Status.phpindex 47008f3057..a326d7c382 100644--- a/app/Http/Livewire/Project/Application/Status.php+++ b/app/Http/Livewire/Project/Application/Status.php@@ -9,6 +9,9 @@ class Status extends Component{public Application $application;+ protected $listeners = [+ 'applicationStatusChanged' => 'pollingStatus',+ ];public function pollingStatus(){$this->application->refresh();diff --git a/app/Http/Livewire/Server/PrivateKey.php b/app/Http/Livewire/Server/PrivateKey.phpindex bafaa89c2d..c969d11d26 100644--- a/app/Http/Livewire/Server/PrivateKey.php+++ b/app/Http/Livewire/Server/PrivateKey.php@@ -7,6 +7,7 @@ use App\Models\Server;use Illuminate\Support\Facades\Route;use Illuminate\Support\Facades\Storage;use Livewire\Component;+use LocalStorage;class PrivateKey extends Component{@@ -19,8 +20,7 @@ class PrivateKey extends Component'private_key_id' => $private_key_id]);// Delete the old ssh mux file to force a new one to be created- Storage::disk('local')->delete(".ssh/ssh_mux_{$server->first()->ip}_{$server->first()->port}_{$server->first()->user}");-+ LocalStorage::ssh_mux()->delete("{$server->first()->ip}_{$server->first()->port}_{$server->first()->user}");return redirect()->route('server.show', $this->parameters['server_uuid']);}public function mount()diff --git a/app/Http/Livewire/Settings/Form.php b/app/Http/Livewire/Settings/Form.phpindex 0c4dcf5a8a..15169096f8 100644--- a/app/Http/Livewire/Settings/Form.php+++ b/app/Http/Livewire/Settings/Form.php@@ -2,8 +2,12 @@namespace App\Http\Livewire\Settings;+use App\Enums\ActivityTypes;use App\Models\InstanceSettings as ModelsInstanceSettings;+use App\Models\Server;use Livewire\Component;+use Spatie\Url\Url;+use Symfony\Component\Yaml\Yaml;class Form extends Component{@@ -44,5 +48,59 @@ class Form extends Component}$this->validate();$this->settings->save();+ if (isset($this->settings->fqdn)) {+ if (config('app.env') == 'local') {+ $server = Server::findOrFail(1);+ $dynamic_config_path = '/data/coolify/proxy/dynamic';+ } else {+ $server = Server::findOrFail(0);+ $dynamic_config_path = '/traefik/dynamic';+ }+ $url = Url::fromString($this->settings->fqdn);+ $host = $url->getHost();+ $schema = $url->getScheme();+ $entryPoints = [+ 0 => 'http',+ ];+ if ($schema === 'https') {+ $entryPoints[] = 'https';+ }+ $traefik_dynamic_conf = [+ 'http' =>+ [+ 'routers' =>+ [+ 'coolify' =>+ [+ 'entryPoints' => $entryPoints,+ 'service' => 'coolify',+ 'rule' => "Host(`{$host}`)",+ ],+ ],+ 'services' =>+ [+ 'coolify' =>+ [+ 'loadBalancer' =>+ [+ 'servers' =>+ [+ 0 =>+ [+ 'url' => 'http://coolify:80',+ ],+ ],+ ],+ ],+ ],+ ],+ ];+ $yaml = Yaml::dump($traefik_dynamic_conf);+ $base64 = base64_encode($yaml);+ remote_process([+ "mkdir -p $dynamic_config_path",+ "echo '$base64' | base64 -d > $dynamic_config_path/coolify.yaml",+ ], $server, ActivityTypes::INLINE->value);+ }}}diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.phpindex b96355d285..9692f6fe30 100644--- a/app/Jobs/ApplicationDeploymentJob.php+++ b/app/Jobs/ApplicationDeploymentJob.php@@ -18,6 +18,8 @@ use Illuminate\Support\Facades\Storage;use Spatie\Activitylog\Models\Activity;use Symfony\Component\Yaml\Yaml;use Illuminate\Support\Str;+use LocalStorage;+use Log;use Spatie\Url\Url;class ApplicationDeploymentJob implements ShouldQueue@@ -203,7 +205,7 @@ COPY --from={$this->application->uuid}:{$this->git_commit}-build /app/{$this->ap$this->fail();} finally {if (isset($this->docker_compose)) {- Storage::disk('deployments')->put(Str::kebab($this->application->name) . '/docker-compose.yml', $this->docker_compose);+ LocalStorage::deployments()->put(Str::kebab($this->application->name) . '/docker-compose.yml', $this->docker_compose);}$this->execute_now(["docker rm -f {$this->deployment_uuid} >/dev/null 2>&1"], hideFromOutput: true);}diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.phpindex 4264c1dd49..ce513b2bd5 100644--- a/app/Jobs/ContainerStatusJob.php+++ b/app/Jobs/ContainerStatusJob.php@@ -21,7 +21,7 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeUniquepublic string|null $application_id = null,) {if ($this->application_id) {- $this->application = Application::find($this->application_id)->first();+ $this->application = Application::find($this->application_id);}}public function uniqueId(): stringdiff --git a/app/Jobs/ContainerStopJob.php b/app/Jobs/ContainerStopJob.phpdeleted file mode 100644index d44851d9ad..0000000000--- a/app/Jobs/ContainerStopJob.php+++ /dev/null@@ -1,39 +0,0 @@-<?php--namespace App\Jobs;--use App\Models\Application;-use App\Models\Server;-use Illuminate\Bus\Queueable;-use Illuminate\Contracts\Queue\ShouldBeUnique;-use Illuminate\Contracts\Queue\ShouldQueue;-use Illuminate\Foundation\Bus\Dispatchable;-use Illuminate\Queue\InteractsWithQueue;-use Illuminate\Queue\SerializesModels;-use Illuminate\Support\Facades\Log;--class ContainerStopJob implements ShouldQueue, ShouldBeUnique-{- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;-- public function __construct(- public int $application_id,- public Server $server,- ) {- }- public function uniqueId(): int- {- return $this->application_id;- }- public function handle(): void- {- try {- $application = Application::find($this->application_id)->first();- instant_remote_process(["docker rm -f {$application->uuid}"], $this->server);- $application->status = get_container_status(server: $application->destination->server, container_id: $application->uuid);- $application->save();- } catch (\Exception $e) {- Log::error($e->getMessage());- }- }-}diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.phpindex 015584d9e9..f01e3b4616 100644--- a/app/Providers/AppServiceProvider.php+++ b/app/Providers/AppServiceProvider.php@@ -8,6 +8,7 @@ use Illuminate\Support\Facades\Process;use Illuminate\Support\Facades\Queue;use Illuminate\Support\ServiceProvider;use Illuminate\Support\Str;+use LocalStorage;class AppServiceProvider extends ServiceProvider{diff --git a/bootstrap/helpers/proxy.php b/bootstrap/helpers/proxy.phpindex 28ee9740bc..f1a897e1b2 100644--- a/bootstrap/helpers/proxy.php+++ b/bootstrap/helpers/proxy.php@@ -7,6 +7,9 @@ if (!function_exists('getProxyConfiguration')) {function getProxyConfiguration(Server $server){$proxy_path = config('coolify.proxy_config_path');+ if (config('app.env') === 'local') {+ $proxy_path = $proxy_path . '/testing-host-1/';+ }$networks = collect($server->standaloneDockers)->map(function ($docker) {return $docker['network'];})->unique();diff --git a/bootstrap/helpers/remoteProcess.php b/bootstrap/helpers/remoteProcess.phpindex 5d06669517..eb4c6f4067 100644--- a/bootstrap/helpers/remoteProcess.php+++ b/bootstrap/helpers/remoteProcess.php@@ -46,19 +46,20 @@ function remote_process(function save_private_key_for_server(Server $server){$temp_file = "id.root@{$server->ip}";- Storage::disk('ssh-keys')->put($temp_file, $server->privateKey->private_key);- return '/var/www/html/storage/app/ssh-keys/' . $temp_file;+ LocalStorage::ssh_keys()->put($temp_file, $server->privateKey->private_key);+ return '/var/www/html/storage/app/private/ssh/keys/' . $temp_file;}function generate_ssh_command(string $private_key_location, string $server_ip, string $user, string $port, string $command, bool $isMux = true){- Storage::disk('local')->makeDirectory('.ssh');+ LocalStorage::ssh_keys();+ LocalStorage::ssh_mux();$delimiter = 'EOF-COOLIFY-SSH';$ssh_command = "ssh ";if ($isMux && config('coolify.mux_enabled')) {- $ssh_command .= '-o ControlMaster=auto -o ControlPersist=1m -o ControlPath=/var/www/html/storage/app/.ssh/ssh_mux_%h_%p_%r ';+ $ssh_command .= '-o ControlMaster=auto -o ControlPersist=1m -o ControlPath=/var/www/html/storage/app/private/ssh/mux/%h_%p_%r ';}$ssh_command .= "-i {$private_key_location} ". '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null '@@ -85,6 +86,7 @@ function instant_remote_process(array $command, Server $server, $throwError = tr$output = trim($process->output());$exitCode = $process->exitCode();if ($exitCode !== 0) {+ Log::info($process->errorOutput());if (!$throwError) {return null;}diff --git a/bootstrap/helpers/storage.php b/bootstrap/helpers/storage.phpnew file mode 100644index 0000000000..488be38c34--- /dev/null+++ b/bootstrap/helpers/storage.php@@ -0,0 +1,38 @@+<?php++use Illuminate\Support\Facades\Facade;+use Illuminate\Support\Facades\Storage;++class LocalStorage extends Facade+{+ public static function deployments()+ {+ $storage = Storage::build([+ 'driver' => 'local',+ 'root' => storage_path("app/private/deployments"),+ 'visibility' => 'private',+ ]);+ $storage->makeDirectory('.');+ return $storage;+ }+ public static function ssh_keys()+ {+ $storage = Storage::build([+ 'driver' => 'local',+ 'root' => storage_path("app/private/ssh/keys"),+ 'visibility' => 'private'+ ]);+ $storage->makeDirectory('.');+ return $storage;+ }+ public static function ssh_mux()+ {+ $storage = Storage::build([+ 'driver' => 'local',+ 'root' => storage_path("app/private/ssh/mux"),+ 'visibility' => 'private',+ ]);+ $storage->makeDirectory('.');+ return $storage;+ }+}diff --git a/config/filesystems.php b/config/filesystems.phpindex 5b579dc62e..c19374b53c 100644--- a/config/filesystems.php+++ b/config/filesystems.php@@ -29,7 +29,6 @@ return [*/'disks' => [-'local' => ['driver' => 'local','root' => storage_path('app'),@@ -39,7 +38,7 @@ return ['public' => ['driver' => 'local','root' => storage_path('app/public'),- 'url' => env('APP_URL').'/storage',+ 'url' => env('APP_URL') . '/storage','visibility' => 'public','throw' => false,],diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.phpindex ff7a7e7166..05ae5c747f 100644--- a/database/migrations/2014_10_12_000000_create_users_table.php+++ b/database/migrations/2014_10_12_000000_create_users_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('users', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->boolean('is_root_user')->default(false);$table->string('name')->default('Your Name Here');diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.phpindex 954f7518f5..73b428ada0 100644--- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php+++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('personal_access_tokens', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->morphs('tokenable');$table->string('name');$table->string('token', 64)->unique();diff --git a/database/migrations/2023_03_20_112811_create_teams_table.php b/database/migrations/2023_03_20_112811_create_teams_table.phpindex 77e7b840f4..815392b1f0 100644--- a/database/migrations/2023_03_20_112811_create_teams_table.php+++ b/database/migrations/2023_03_20_112811_create_teams_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('teams', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->string('name');$table->boolean('personal_team')->default(false);diff --git a/database/migrations/2023_03_20_112812_create_team_user_table.php b/database/migrations/2023_03_20_112812_create_team_user_table.phpindex 3e2787630b..7b09563525 100644--- a/database/migrations/2023_03_20_112812_create_team_user_table.php+++ b/database/migrations/2023_03_20_112812_create_team_user_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('team_user', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->foreignId('team_id');$table->foreignId('user_id');$table->string('role')->nullable();diff --git a/database/migrations/2023_03_20_112813_create_instance_settings_table.php b/database/migrations/2023_03_20_112813_create_instance_settings_table.phpindex a6e241bb0a..77fc68853f 100644--- a/database/migrations/2023_03_20_112813_create_instance_settings_table.php+++ b/database/migrations/2023_03_20_112813_create_instance_settings_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('instance_settings', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('fqdn')->nullable();$table->string('wildcard_domain')->nullable();$table->string('redirect_url')->nullable();diff --git a/database/migrations/2023_03_24_140711_create_servers_table.php b/database/migrations/2023_03_24_140711_create_servers_table.phpindex 84e2ab6ba8..a8a964e8ed 100644--- a/database/migrations/2023_03_24_140711_create_servers_table.php+++ b/database/migrations/2023_03_24_140711_create_servers_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('servers', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->string('name');$table->string('description')->nullable();diff --git a/database/migrations/2023_03_24_140712_create_server_settings_table.php b/database/migrations/2023_03_24_140712_create_server_settings_table.phpindex 30ede38702..5cad56b50f 100644--- a/database/migrations/2023_03_24_140712_create_server_settings_table.php+++ b/database/migrations/2023_03_24_140712_create_server_settings_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('server_settings', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->boolean('is_part_of_swarm')->default(false);diff --git a/database/migrations/2023_03_24_140853_create_private_keys_table.php b/database/migrations/2023_03_24_140853_create_private_keys_table.phpindex 2795f6b0ed..176af39389 100644--- a/database/migrations/2023_03_24_140853_create_private_keys_table.php+++ b/database/migrations/2023_03_24_140853_create_private_keys_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('private_keys', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->string('name');$table->string('description')->nullable();diff --git a/database/migrations/2023_03_27_075351_create_projects_table.php b/database/migrations/2023_03_27_075351_create_projects_table.phpindex 432496268e..a8010757af 100644--- a/database/migrations/2023_03_27_075351_create_projects_table.php+++ b/database/migrations/2023_03_27_075351_create_projects_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('projects', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->string('name');$table->string('description')->nullable();diff --git a/database/migrations/2023_03_27_075443_create_project_settings_table.php b/database/migrations/2023_03_27_075443_create_project_settings_table.phpindex 40e8bed1fa..06bf554dcc 100644--- a/database/migrations/2023_03_27_075443_create_project_settings_table.php+++ b/database/migrations/2023_03_27_075443_create_project_settings_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('project_settings', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->string('wildcard_domain')->nullable();diff --git a/database/migrations/2023_03_27_075444_create_environments_table.php b/database/migrations/2023_03_27_075444_create_environments_table.phpindex f9514dcce3..a8cd055e0c 100644--- a/database/migrations/2023_03_27_075444_create_environments_table.php+++ b/database/migrations/2023_03_27_075444_create_environments_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('environments', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('name');$table->foreignId('project_id');$table->timestamps();diff --git a/database/migrations/2023_03_27_081716_create_applications_table.php b/database/migrations/2023_03_27_081716_create_applications_table.phpindex b180ca8b94..fdfc68cff3 100644--- a/database/migrations/2023_03_27_081716_create_applications_table.php+++ b/database/migrations/2023_03_27_081716_create_applications_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('applications', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->integer('repository_project_id')->nullable();$table->string('uuid')->unique();$table->string('name');diff --git a/database/migrations/2023_03_27_081717_create_application_settings_table.php b/database/migrations/2023_03_27_081717_create_application_settings_table.phpindex 0e7e386a23..eeb65dfe19 100644--- a/database/migrations/2023_03_27_081717_create_application_settings_table.php+++ b/database/migrations/2023_03_27_081717_create_application_settings_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('application_settings', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->boolean('is_static')->default(false);$table->boolean('is_git_submodules_allowed')->default(true);$table->boolean('is_git_lfs_allowed')->default(true);diff --git a/database/migrations/2023_03_27_083620_create_databases_table.php b/database/migrations/2023_03_27_083620_create_databases_table.phpindex bfafb9c0c6..d60d66a281 100644--- a/database/migrations/2023_03_27_083620_create_databases_table.php+++ b/database/migrations/2023_03_27_083620_create_databases_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('databases', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->string('name');diff --git a/database/migrations/2023_03_27_083621_create_services_table.php b/database/migrations/2023_03_27_083621_create_services_table.phpindex 12bb77b1ba..812e7901fc 100644--- a/database/migrations/2023_03_27_083621_create_services_table.php+++ b/database/migrations/2023_03_27_083621_create_services_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('services', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->string('name');diff --git a/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php b/database/migrations/2023_03_27_085020_create_standalone_dockers_table.phpindex f7f4300994..635b1f6c5e 100644--- a/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php+++ b/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('standalone_dockers', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('name');$table->string('uuid')->unique();$table->string('network');diff --git a/database/migrations/2023_03_27_085022_create_swarm_dockers_table.php b/database/migrations/2023_03_27_085022_create_swarm_dockers_table.phpindex ea85640baa..79af98cb7b 100644--- a/database/migrations/2023_03_27_085022_create_swarm_dockers_table.php+++ b/database/migrations/2023_03_27_085022_create_swarm_dockers_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('swarm_dockers', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('name');$table->string('uuid')->unique();diff --git a/database/migrations/2023_03_28_062150_create_kubernetes_table.php b/database/migrations/2023_03_28_062150_create_kubernetes_table.phpindex 365380e1fc..1b46a63fa8 100644--- a/database/migrations/2023_03_28_062150_create_kubernetes_table.php+++ b/database/migrations/2023_03_28_062150_create_kubernetes_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('kubernetes', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->timestamps();diff --git a/database/migrations/2023_03_28_083722_create_gits_table.php b/database/migrations/2023_03_28_083722_create_gits_table.phpindex cb7a8de1d7..56eb2586e2 100644--- a/database/migrations/2023_03_28_083722_create_gits_table.php+++ b/database/migrations/2023_03_28_083722_create_gits_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('gits', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->enum('type', ['github', 'gitlab', 'bitbucket', 'custom']);$table->string('api_url');diff --git a/database/migrations/2023_03_28_083723_create_github_apps_table.php b/database/migrations/2023_03_28_083723_create_github_apps_table.phpindex 27f1939125..a41dabee72 100644--- a/database/migrations/2023_03_28_083723_create_github_apps_table.php+++ b/database/migrations/2023_03_28_083723_create_github_apps_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('github_apps', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->string('name');diff --git a/database/migrations/2023_03_28_083726_create_gitlab_apps_table.php b/database/migrations/2023_03_28_083726_create_gitlab_apps_table.phpindex 24db88d863..c93ca8e197 100644--- a/database/migrations/2023_03_28_083726_create_gitlab_apps_table.php+++ b/database/migrations/2023_03_28_083726_create_gitlab_apps_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('gitlab_apps', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->string('name');diff --git a/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.php b/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.phpindex e6f6c2e4a2..4e610e6201 100644--- a/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.php+++ b/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('local_persistent_volumes', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->string('name');$table->string('mount_path');diff --git a/database/migrations/2023_05_04_194548_create_environment_variables_table.php b/database/migrations/2023_05_04_194548_create_environment_variables_table.phpindex 758e742273..8493acd0d1 100644--- a/database/migrations/2023_05_04_194548_create_environment_variables_table.php+++ b/database/migrations/2023_05_04_194548_create_environment_variables_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('environment_variables', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('key');$table->string('value')->nullable();diff --git a/database/migrations/2023_05_17_104039_create_failed_jobs_table.php b/database/migrations/2023_05_17_104039_create_failed_jobs_table.phpindex 249da8171a..08606bda4b 100644--- a/database/migrations/2023_05_17_104039_create_failed_jobs_table.php+++ b/database/migrations/2023_05_17_104039_create_failed_jobs_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('failed_jobs', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('uuid')->unique();$table->text('connection');$table->text('queue');diff --git a/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php b/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.phpindex 47796c02b5..372984c8b7 100644--- a/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php+++ b/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php@@ -12,7 +12,7 @@ return new class extends Migrationpublic function up(): void{Schema::create('application_deployment_queues', function (Blueprint $table) {- $table->id();+ $table->bigIncrements('id');$table->string('application_id');$table->integer('pull_request_id')->default(0);$table->schemalessAttributes('metadata');diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.phpindex 5ce8f8892e..630cb08caa 100644--- a/database/seeders/ProductionSeeder.php+++ b/database/seeders/ProductionSeeder.php@@ -14,6 +14,7 @@ use App\Models\StandaloneDocker;use App\Models\Team;use Illuminate\Database\Seeder;use Illuminate\Support\Facades\Storage;+use LocalStorage;class ProductionSeeder extends Seeder{@@ -56,7 +57,7 @@ class ProductionSeeder extends Seeder// Save SSH Keys for the Coolify Host$coolify_key_name = "[email protected]";- $coolify_key = Storage::disk('local')->get("ssh-keys/{$coolify_key_name}");+ $coolify_key = LocalStorage::ssh_keys()->get("{$coolify_key_name}");if ($coolify_key) {$private_key = PrivateKey::find(0);diff --git a/docker-compose.prod.yml b/docker-compose.prod.ymlindex 2d088d90a4..b0362cc328 100644--- a/docker-compose.prod.yml+++ b/docker-compose.prod.yml@@ -7,9 +7,7 @@ services:source: /data/coolify/source/.envtarget: /var/www/html/.envread_only: true- - /data/coolify/deployments:/var/www/html/storage/app/deployments- - /data/coolify/ssh-keys:/var/www/html/storage/app/ssh-keys- - /data/coolify/proxy:/var/www/html/storage/app/proxy+ - /data/coolify:/var/www/html/storage/app/environment:- APP_ENV=production- APP_DEBUGdiff --git a/docker-compose.yml b/docker-compose.ymlindex e84ce3220f..ecd3f8b7c8 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -10,6 +10,7 @@ services:- coolifydepends_on:- postgres+ - redispostgres:image: postgres:15-alpinediff --git a/scripts/run b/scripts/runindex d0537d85fa..546580828f 100755--- a/scripts/run+++ b/scripts/run@@ -60,6 +60,9 @@ function coolify {function coolify:root {bash vendor/bin/spin exec coolify bash}+function coolify:proxy {+ docker exec -ti coolify-proxy sh+}function redis {docker exec -ti coolify-redis redis-cli