diff --git a/app/Http/Livewire/Settings/Configuration.php b/app/Http/Livewire/Settings/Configuration.php index 3405562b2..04e12980b 100644 --- a/app/Http/Livewire/Settings/Configuration.php +++ b/app/Http/Livewire/Settings/Configuration.php @@ -2,6 +2,7 @@ namespace App\Http\Livewire\Settings; +use App\Jobs\InstanceProxyCheckJob; use App\Models\InstanceSettings as ModelsInstanceSettings; use App\Models\Server; use Livewire\Component; @@ -193,12 +194,11 @@ class Configuration extends Component $this->settings->save(); $this->dynamic_config_path = '/data/coolify/proxy/dynamic'; - if (config('app.env') == 'local') { - $this->server = Server::findOrFail(1); - } else { - $this->server = Server::findOrFail(0); - } + $this->server = Server::findOrFail(0); $this->setup_instance_fqdn(); $this->setup_default_redirect_404(); + if ($this->settings->fqdn || $this->settings->default_redirect_404) { + dispatch(new InstanceProxyCheckJob()); + } } } diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 74b1a6c2c..51bc5d741 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -303,12 +303,17 @@ COPY --from=$this->build_image_name /app/{$this->application->publish_directory} ]); $this->activity->save(); } - dispatch(new ApplicationPullRequestUpdateJob( - application_id: $this->application->id, - pull_request_id: $this->pull_request_id, - deployment_uuid: $this->deployment_uuid, - status: $status - )); + if ($this->pull_request_id) { + dispatch(new ApplicationPullRequestUpdateJob( + application_id: $this->application->id, + pull_request_id: $this->pull_request_id, + deployment_uuid: $this->deployment_uuid, + status: $status + )); + } + if ($this->application->fqdn) { + dispatch(new InstanceProxyCheckJob()); + } queue_next_deployment($this->application); } private function execute_in_builder(string $command) diff --git a/app/Jobs/InstanceProxyCheckJob.php b/app/Jobs/InstanceProxyCheckJob.php index 1de91261b..4182f12bc 100755 --- a/app/Jobs/InstanceProxyCheckJob.php +++ b/app/Jobs/InstanceProxyCheckJob.php @@ -29,7 +29,6 @@ class InstanceProxyCheckJob implements ShouldQueue { try { $container_name = 'coolify-proxy'; - $configuration_path = config('coolify.proxy_config_path'); $servers = Server::whereRelation('settings', 'is_validated', true)->where('extra_attributes->proxy_type', ProxyTypes::TRAEFIK_V2)->get(); foreach ($servers as $server) { diff --git a/database/seeders/ServerSeeder.php b/database/seeders/ServerSeeder.php index 9754be613..2f265d5da 100644 --- a/database/seeders/ServerSeeder.php +++ b/database/seeders/ServerSeeder.php @@ -22,6 +22,7 @@ class ServerSeeder extends Seeder $private_key_1 = PrivateKey::find(1); Server::create([ + 'id' => 0, 'name' => "testing-local-docker-container", 'description' => "This is a test docker container", 'ip' => "coolify-testing-host", diff --git a/database/seeders/ServerSettingSeeder.php b/database/seeders/ServerSettingSeeder.php index c05e630a2..ce2f0ee1f 100644 --- a/database/seeders/ServerSettingSeeder.php +++ b/database/seeders/ServerSettingSeeder.php @@ -13,12 +13,12 @@ class ServerSettingSeeder extends Seeder */ public function run(): void { - $server_2 = Server::find(1)->load(['settings']); + $server_2 = Server::find(0)->load(['settings']); $server_2->settings->is_build_server = true; $server_2->settings->is_validated = true; $server_2->settings->save(); - $server_3 = Server::find(2)->load(['settings']); + $server_3 = Server::find(1)->load(['settings']); $server_3->settings->is_part_of_swarm = false; $server_3->settings->is_validated = false; $server_3->settings->save(); diff --git a/database/seeders/StandaloneDockerSeeder.php b/database/seeders/StandaloneDockerSeeder.php index 340f102c9..cbf32759f 100644 --- a/database/seeders/StandaloneDockerSeeder.php +++ b/database/seeders/StandaloneDockerSeeder.php @@ -15,7 +15,7 @@ class StandaloneDockerSeeder extends Seeder */ public function run(): void { - $server_1 = Server::find(1); + $server_1 = Server::find(0); StandaloneDocker::create([ 'name' => 'Standalone Docker 1', 'network' => 'coolify', diff --git a/database/seeders/SwarmDockerSeeder.php b/database/seeders/SwarmDockerSeeder.php index f1a79d3ba..a9662a969 100644 --- a/database/seeders/SwarmDockerSeeder.php +++ b/database/seeders/SwarmDockerSeeder.php @@ -16,7 +16,7 @@ class SwarmDockerSeeder extends Seeder */ public function run(): void { - $server_2 = Server::find(2); + $server_2 = Server::find(1); SwarmDocker::create([ 'name' => 'Swarm Docker 1', 'server_id' => $server_2->id, diff --git a/docker/coolify-builder/Dockerfile b/docker/coolify-builder/Dockerfile index ccd77347d..d6775175a 100644 --- a/docker/coolify-builder/Dockerfile +++ b/docker/coolify-builder/Dockerfile @@ -4,7 +4,7 @@ ARG TARGETPLATFORM # https://download.docker.com/linux/static/stable/ ARG DOCKER_VERSION=24.0.2 # https://github.com/docker/compose/releases -ARG DOCKER_COMPOSE_VERSION=2.19.1 +ARG DOCKER_COMPOSE_VERSION=2.18.1 # https://github.com/docker/buildx/releases ARG DOCKER_BUILDX_VERSION=0.10.5 # https://github.com/buildpacks/pack/releases diff --git a/docker/testing-host/Dockerfile b/docker/testing-host/Dockerfile index d03d8a30b..87f7b764d 100644 --- a/docker/testing-host/Dockerfile +++ b/docker/testing-host/Dockerfile @@ -4,7 +4,7 @@ ARG TARGETPLATFORM # https://download.docker.com/linux/static/stable/ ARG DOCKER_VERSION=24.0.2 # https://github.com/docker/compose/releases -ARG DOCKER_COMPOSE_VERSION=2.19.1 +ARG DOCKER_COMPOSE_VERSION=2.18.1 # https://github.com/docker/buildx/releases ARG DOCKER_BUILDX_VERSION=0.10.5 # https://github.com/buildpacks/pack/releases diff --git a/resources/css/app.css b/resources/css/app.css index cd8a20f89..c6b246520 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -14,7 +14,7 @@ body { @apply scrollbar min-h-screen bg-coolgray-100 text-neutral-400 antialiased; } main { - @apply px-32 xl:px-14 mx-auto max-w-screen-xl pt-4; + @apply pl-24 pr-10 lg:px-14 mx-auto max-w-screen-xl pt-4; } input[type="checkbox"] { diff --git a/resources/js/components/MagicBar.vue b/resources/js/components/MagicBar.vue index f997a07d5..c7cc04686 100644 --- a/resources/js/components/MagicBar.vue +++ b/resources/js/components/MagicBar.vue @@ -1,7 +1,7 @@