Skip to content

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.

fix

Andras Bacsai4698ab972216
diff --git a/app/Http/Livewire/Settings/Configuration.php b/app/Http/Livewire/Settings/Configuration.php
index 3405562b2d..04e12980b7 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 74b1a6c2c5..51bc5d7411 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 1de91261be..4182f12bc7 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 9754be6134..2f265d5dac 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 c05e630a22..ce2f0ee1f8 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 340f102c9e..cbf32759f0 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 f1a79d3ba6..a9662a9690 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 ccd77347dc..d6775175ab 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 d03d8a30b4..87f7b764d4 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 cd8a20f89c..c6b2465202 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 f997a07d5d..c7cc046867 100644
--- a/resources/js/components/MagicBar.vue
+++ b/resources/js/components/MagicBar.vue
@@ -1,7 +1,7 @@
<template>
<Transition name="fade">
<div>
- <div class="flex items-center p-1 px-2 mt-2 overflow-hidden transition-all transform rounded cursor-pointer bg-coolgray-200"
+ <div class="flex items-center p-1 px-2 mt-1 overflow-hidden transition-all transform rounded cursor-pointer bg-coolgray-200"
@click="showCommandPalette = true">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 icon" viewBox="0 0 24 24" stroke-width="2"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
diff --git a/resources/views/components/applications/navbar.blade.php b/resources/views/components/applications/navbar.blade.php
index 0ef8728f6d..1f71f9df1f 100644
--- a/resources/views/components/applications/navbar.blade.php
+++ b/resources/views/components/applications/navbar.blade.php
@@ -20,10 +20,11 @@
<label tabindex="0" class="flex items-center gap-2 text-sm cursor-pointer hover:text-white"> Links
<x-chevron-down />
</label>
- <div class="absolute hidden group-hover:block ">
- <ul tabindex="0" class="text-xs text-white normal-case rounded min-w-max menu bg-coolgray-200">
+ <div class="absolute hidden group-hover:block">
+ <ul tabindex="0"
+ class="relative -ml-24 text-xs text-white normal-case rounded min-w-max menu bg-coolgray-200">
<li>
- <a target="_blank" class="text-xs text-white rounded-none hover:no-underline hover:bg-coollabs"
+ <a target="_blank" class="text-xs text-white rounded-none hover:no-underline"
href="{{ $application->gitBranchLocation }}">
<x-git-icon git="{{ $application->source?->getMorphClass() }}" />
Git Repository
diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php
index 3a636c77eb..97d05e534c 100644
--- a/resources/views/components/navbar.blade.php
+++ b/resources/views/components/navbar.blade.php
@@ -1,5 +1,5 @@
@auth
- <nav class="fixed h-full pt-16 overflow-hidden">
+ <nav class="fixed h-full overflow-hidden pt-14">
<ul class="gap-4 menu">
<li>
<a class="hover:bg-transparent" @if (!request()->is('/')) href="/" @endif>
@@ -73,7 +73,7 @@
<div class="fixed right-0 p-2 top-1">
<div class="group">
<label tabindex="0"
- class="absolute top-0 right-0 p-2 m-2 cursor-pointer hover:bg-transparent hover:text-warning">
+ class="absolute top-0 right-0 p-2 m-2 my-1 cursor-pointer hover:bg-transparent hover:text-warning">
<div class="flex items-center justify-center gap-2 placeholder">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
diff --git a/resources/views/destination/all.blade.php b/resources/views/destination/all.blade.php
index 11e1735081..5184674515 100644
--- a/resources/views/destination/all.blade.php
+++ b/resources/views/destination/all.blade.php
@@ -1,7 +1,7 @@
<x-layout>
<h1>Destinations</h1>
<div class="pt-2 pb-10 text-sm">All Destinations</div>
- <div class="grid grid-cols-2 gap-2">
+ <div class="grid lg:grid-cols-2 gap-2">
@forelse ($destinations as $destination)
@if ($destination->getMorphClass() === 'App\Models\StandaloneDocker')
<a class="flex gap-4 text-center hover:no-underline box group"
diff --git a/resources/views/livewire/project/application/deploy.blade.php b/resources/views/livewire/project/application/deploy.blade.php
index b778e1b1f2..e7ad09c4ec 100644
--- a/resources/views/livewire/project/application/deploy.blade.php
+++ b/resources/views/livewire/project/application/deploy.blade.php
@@ -5,7 +5,8 @@
</label>
<div class="absolute hidden group-hover:block ">
@if ($application->status === 'running')
- <ul tabindex="0" class="text-xs text-white normal-case rounded min-w-max menu bg-coolgray-200">
+ <ul tabindex="0"
+ class="relative text-xs text-white normal-case rounded -ml-44 min-w-max menu bg-coolgray-200">
<li>
<div class="rounded-none hover:bg-coollabs" wire:click='deploy'><svg
xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" viewBox="0 0 24 24"
diff --git a/resources/views/livewire/server/private-key.blade.php b/resources/views/livewire/server/private-key.blade.php
index a6f9e108b8..6f2a30a563 100644
--- a/resources/views/livewire/server/private-key.blade.php
+++ b/resources/views/livewire/server/private-key.blade.php
@@ -1,4 +1,4 @@
-<div class="grid grid-cols-2">
+<div class="grid lg:grid-cols-2 gap-2">
@forelse ($private_keys as $private_key)
<x-forms.button wire:click='setPrivateKey({{ $private_key->id }})'>{{ $private_key->name }}
</x-forms.button>
diff --git a/resources/views/livewire/server/proxy/deploy.blade.php b/resources/views/livewire/server/proxy/deploy.blade.php
index d4783ec20b..6c9513edd8 100644
--- a/resources/views/livewire/server/proxy/deploy.blade.php
+++ b/resources/views/livewire/server/proxy/deploy.blade.php
@@ -7,7 +7,8 @@
<x-chevron-down />
</label>
<div class="absolute hidden group-hover:block ">
- <ul tabindex="0" class="text-xs text-white normal-case rounded min-w-max menu bg-coolgray-200">
+ <ul tabindex="0"
+ class="relative text-xs text-white normal-case rounded -ml-28 min-w-max menu bg-coolgray-200">
<li>
<a target="_blank"
class="text-xs text-white rounded-none hover:no-underline hover:bg-coollabs"
@@ -25,7 +26,7 @@
</label>
<div class="absolute hidden group-hover:block ">
<ul tabindex="0"
- class="mt-1 text-xs text-white normal-case rounded min-w-max menu bg-coolgray-200">
+ class="relative text-xs text-white normal-case rounded min-w-max menu bg-coolgray-200 -ml-14">
<li>
<div class="rounded-none hover:bg-coollabs" wire:click='deploy'><svg
xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" viewBox="0 0 24 24"
diff --git a/resources/views/livewire/team/invitations.blade.php b/resources/views/livewire/team/invitations.blade.php
index 8fe167d559..2625d21b73 100644
--- a/resources/views/livewire/team/invitations.blade.php
+++ b/resources/views/livewire/team/invitations.blade.php
@@ -13,7 +13,6 @@
</tr>
</thead>
<tbody x-data>
-
@foreach ($invitations as $invite)
<tr>
<td>{{ $invite->email }}</td>
diff --git a/resources/views/project/application/configuration.blade.php b/resources/views/project/application/configuration.blade.php
index d248e1e075..ef3752494a 100644
--- a/resources/views/project/application/configuration.blade.php
+++ b/resources/views/project/application/configuration.blade.php
@@ -1,9 +1,10 @@
<x-layout>
<h1>Configuration</h1>
- <nav class="flex pt-2 pb-10 text-sm">
- <ol class="inline-flex items-center">
+ <nav class="flex pt-2 pb-10">
+ <ol class="flex items-center">
<li class="inline-flex items-center">
- <a href="{{ route('project.show', ['project_uuid' => request()->route('project_uuid')]) }}">
+ <a class="text-xs truncate lg:text-sm"
+ href="{{ route('project.show', ['project_uuid' => request()->route('project_uuid')]) }}">
{{ $application->environment->project->name }}</a>
</li>
<li>
@@ -14,7 +15,7 @@
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</svg>
- <a
+ <a class="text-xs truncate lg:text-sm"
href="{{ route('project.resources', ['environment_name' => request()->route('environment_name'), 'project_uuid' => request()->route('project_uuid')]) }}">{{ request()->route('environment_name') }}</a>
</div>
</li>
@@ -26,7 +27,7 @@
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</svg>
- <span>{{ data_get($application, 'name') }}</span>
+ <span class="text-xs truncate lg:text-sm">{{ data_get($application, 'name') }}</span>
</div>
</li>
<li>
diff --git a/resources/views/project/resources.blade.php b/resources/views/project/resources.blade.php
index c467ffe579..2482669d6f 100644
--- a/resources/views/project/resources.blade.php
+++ b/resources/views/project/resources.blade.php
@@ -28,7 +28,7 @@
@if ($environment->applications->count() === 0)
<p>No resources found.</p>
@endif
- <div class="grid grid-cols-2 gap-2">
+ <div class="grid lg:grid-cols-2 gap-2">
@foreach ($environment->applications->sortBy('name') as $application)
<a class="box"
href="{{ route('project.application.configuration', [$project->uuid, $environment->name, $application->uuid]) }}">
diff --git a/resources/views/project/show.blade.php b/resources/views/project/show.blade.php
index 24e0e98557..8ef640a947 100644
--- a/resources/views/project/show.blade.php
+++ b/resources/views/project/show.blade.php
@@ -4,7 +4,7 @@
<livewire:project.delete-project :project_id="$project->id" :resource_count="$project->applications->count()" />
</div>
<div class="pt-2 pb-10 text-sm">{{ $project->name }}.</div>
- <div class="grid grid-cols-2 gap-2">
+ <div class="grid lg:grid-cols-2 gap-2">
@forelse ($project->environments as $environment)
<a class="box" href="{{ route('project.resources', [$project->uuid, $environment->name]) }}">
{{ $environment->name }}
diff --git a/resources/views/projects.blade.php b/resources/views/projects.blade.php
index 91e5fab81f..00b4f7da61 100644
--- a/resources/views/projects.blade.php
+++ b/resources/views/projects.blade.php
@@ -1,7 +1,7 @@
<x-layout>
<h1>Projects</h1>
<div class="pt-2 pb-10 text-sm">All Projects</div>
- <div class="grid grid-cols-2 gap-2">
+ <div class="grid gap-2 lg:grid-cols-2">
@forelse ($projects as $project)
<a href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}"
class="box">{{ $project->name }}</a>
diff --git a/resources/views/server/all.blade.php b/resources/views/server/all.blade.php
index 4959a9d2d9..229534913a 100644
--- a/resources/views/server/all.blade.php
+++ b/resources/views/server/all.blade.php
@@ -1,7 +1,7 @@
<x-layout>
<h1>Servers</h1>
<div class="pt-2 pb-10 text-sm">All Servers</div>
- <div class="grid grid-cols-2 gap-2">
+ <div class="grid gap-2 lg:grid-cols-2">
@forelse ($servers as $server)
<a class="text-center hover:no-underline box group"
href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}">
diff --git a/resources/views/source/all.blade.php b/resources/views/source/all.blade.php
index d251ab163a..56db1b8267 100644
--- a/resources/views/source/all.blade.php
+++ b/resources/views/source/all.blade.php
@@ -1,7 +1,7 @@
<x-layout>
<h1>Sources</h1>
<div class="pt-2 pb-10 text-sm">All Sources</div>
- <div class="grid grid-cols-2 gap-2">
+ <div class="grid gap-2 lg:grid-cols-2">
@forelse ($sources as $source)
@if ($source->getMorphClass() === 'App\Models\GithubApp')
<a class="flex gap-4 text-center hover:no-underline box group"