diff --git a/.github/workflows/coolify-helper-next.yml b/.github/workflows/coolify-helper-next.yml index fe14ba759..d9921b363 100644 --- a/.github/workflows/coolify-helper-next.yml +++ b/.github/workflows/coolify-helper-next.yml @@ -18,15 +18,15 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Login to ghcr.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build image and push to registry - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: no-cache: true context: . @@ -40,15 +40,15 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Login to ghcr.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build image and push to registry - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: no-cache: true context: . @@ -64,13 +64,13 @@ jobs: needs: [ amd64, aarch64 ] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to ghcr.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} diff --git a/.github/workflows/coolify-helper.yml b/.github/workflows/coolify-helper.yml index d174bfaf9..7e8132ec6 100644 --- a/.github/workflows/coolify-helper.yml +++ b/.github/workflows/coolify-helper.yml @@ -18,15 +18,15 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Login to ghcr.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build image and push to registry - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: no-cache: true context: . @@ -40,15 +40,15 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Login to ghcr.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build image and push to registry - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: no-cache: true context: . @@ -64,13 +64,13 @@ jobs: needs: [ amd64, aarch64 ] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to ghcr.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} diff --git a/.github/workflows/coolify-testing-host.yml b/.github/workflows/coolify-testing-host.yml index a40dfd285..5fdc32991 100644 --- a/.github/workflows/coolify-testing-host.yml +++ b/.github/workflows/coolify-testing-host.yml @@ -18,15 +18,15 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Login to ghcr.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build image and push to registry - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: no-cache: true context: . @@ -40,15 +40,15 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Login to ghcr.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build image and push to registry - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: no-cache: true context: . @@ -64,13 +64,13 @@ jobs: needs: [ amd64, aarch64 ] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to ghcr.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 36def4911..0edaa4f1c 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,7 +14,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Docker layers uses: actions/cache@v2 with: diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index c6a5b3273..c139793ec 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -30,5 +30,5 @@ Your horizon (Laravel scheduler): `localhost:8000/horizon` - Only reachable if y Mails are caught by Mailpit: `localhost:8025` ## New Service Contribution -Check out the docs [here](https://coolify.io/docs/how-to-add-a-service). +Check out the docs [here](https://coolify.io/docs/resources/services/add-service). diff --git a/app/Actions/Server/InstallDocker.php b/app/Actions/Server/InstallDocker.php index 553a1c09d..1db766a88 100644 --- a/app/Actions/Server/InstallDocker.php +++ b/app/Actions/Server/InstallDocker.php @@ -13,7 +13,7 @@ class InstallDocker { $supported_os_type = $server->validateOS(); if (!$supported_os_type) { - throw new \Exception('Server OS type is not supported for automated installation. Please install Docker manually before continuing: documentation.'); + throw new \Exception('Server OS type is not supported for automated installation. Please install Docker manually before continuing: documentation.'); } ray('Installing Docker on server: ' . $server->name . ' (' . $server->ip . ')' . ' with OS type: ' . $supported_os_type); $dockerVersion = '24.0'; diff --git a/app/Actions/Server/UpdateCoolify.php b/app/Actions/Server/UpdateCoolify.php index 09efb848e..6c01f75c9 100644 --- a/app/Actions/Server/UpdateCoolify.php +++ b/app/Actions/Server/UpdateCoolify.php @@ -12,10 +12,12 @@ class UpdateCoolify public ?Server $server = null; public ?string $latestVersion = null; public ?string $currentVersion = null; + public bool $async = false; - public function handle(bool $force) + public function handle(bool $force = false, bool $async = false) { try { + $this->async = $async; $settings = InstanceSettings::get(); ray('Running InstanceAutoUpdateJob'); $this->server = Server::find(0); @@ -56,17 +58,31 @@ class UpdateCoolify { if (isDev()) { ray("Running update on local docker container. Updating to $this->latestVersion"); - remote_process([ - "sleep 10" - ], $this->server); + if ($this->async) { + ray('Running async update'); + remote_process([ + "sleep 10" + ], $this->server); + } else { + instant_remote_process([ + "sleep 10" + ], $this->server); + } ray('Update done'); return; } else { ray('Running update on production server'); - remote_process([ - "curl -fsSL https://cdn.coollabs.io/coolify/upgrade.sh -o /data/coolify/source/upgrade.sh", - "bash /data/coolify/source/upgrade.sh $this->latestVersion" - ], $this->server); + if ($this->async) { + remote_process([ + "curl -fsSL https://cdn.coollabs.io/coolify/upgrade.sh -o /data/coolify/source/upgrade.sh", + "bash /data/coolify/source/upgrade.sh $this->latestVersion" + ], $this->server); + } else { + instant_remote_process([ + "curl -fsSL https://cdn.coollabs.io/coolify/upgrade.sh -o /data/coolify/source/upgrade.sh", + "bash /data/coolify/source/upgrade.sh $this->latestVersion" + ], $this->server); + } return; } } diff --git a/app/Http/Controllers/Api/Deploy.php b/app/Http/Controllers/Api/Deploy.php index 89a994afe..5469ba1c6 100644 --- a/app/Http/Controllers/Api/Deploy.php +++ b/app/Http/Controllers/Api/Deploy.php @@ -44,7 +44,7 @@ class Deploy extends Controller $force = $request->query->get('force') ?? false; if ($uuids && $tags) { - return response()->json(['error' => 'You can only use uuid or tag, not both.', 'docs' => 'https://coolify.io/docs/api/deploy-webhook'], 400); + return response()->json(['error' => 'You can only use uuid or tag, not both.', 'docs' => 'https://coolify.io/docs/api-reference/deploy-webhook'], 400); } if (is_null($teamId)) { return invalid_token(); @@ -54,7 +54,7 @@ class Deploy extends Controller } else if ($uuids) { return $this->by_uuids($uuids, $teamId, $force); } - return response()->json(['error' => 'You must provide uuid or tag.', 'docs' => 'https://coolify.io/docs/api/deploy-webhook'], 400); + return response()->json(['error' => 'You must provide uuid or tag.', 'docs' => 'https://coolify.io/docs/api-reference/deploy-webhook'], 400); } private function by_uuids(string $uuid, int $teamId, bool $force = false) { @@ -62,7 +62,7 @@ class Deploy extends Controller $uuids = collect(array_filter($uuids)); if (count($uuids) === 0) { - return response()->json(['error' => 'No UUIDs provided.', 'docs' => 'https://coolify.io/docs/api/deploy-webhook'], 400); + return response()->json(['error' => 'No UUIDs provided.', 'docs' => 'https://coolify.io/docs/api-reference/deploy-webhook'], 400); } $deployments = collect(); $payload = collect(); @@ -81,7 +81,7 @@ class Deploy extends Controller $payload->put('deployments', $deployments->toArray()); return response()->json($payload->toArray(), 200); } - return response()->json(['error' => "No resources found.", 'docs' => 'https://coolify.io/docs/api/deploy-webhook'], 404); + return response()->json(['error' => "No resources found.", 'docs' => 'https://coolify.io/docs/api-reference/deploy-webhook'], 404); } public function by_tags(string $tags, int $team_id, bool $force = false) { @@ -89,7 +89,7 @@ class Deploy extends Controller $tags = collect(array_filter($tags)); if (count($tags) === 0) { - return response()->json(['error' => 'No TAGs provided.', 'docs' => 'https://coolify.io/docs/api/deploy-webhook'], 400); + return response()->json(['error' => 'No TAGs provided.', 'docs' => 'https://coolify.io/docs/api-reference/deploy-webhook'], 400); } $message = collect([]); $deployments = collect(); @@ -127,7 +127,7 @@ class Deploy extends Controller return response()->json($payload->toArray(), 200); } - return response()->json(['error' => "No resources found with this tag.", 'docs' => 'https://coolify.io/docs/api/deploy-webhook'], 404); + return response()->json(['error' => "No resources found with this tag.", 'docs' => 'https://coolify.io/docs/api-reference/deploy-webhook'], 404); } public function deploy_resource($resource, bool $force = false): array { diff --git a/app/Http/Controllers/Api/Team.php b/app/Http/Controllers/Api/Team.php index 453c2590f..d5b1f6209 100644 --- a/app/Http/Controllers/Api/Team.php +++ b/app/Http/Controllers/Api/Team.php @@ -26,7 +26,7 @@ class Team extends Controller $teams = auth()->user()->teams; $team = $teams->where('id', $id)->first(); if (is_null($team)) { - return response()->json(['error' => 'Team not found.', "docs" => "https://coolify.io/docs/api/team-by-id"], 404); + return response()->json(['error' => 'Team not found.', "docs" => "https://coolify.io/docs/api-reference/get-team-by-teamid"], 404); } return response()->json($team); } @@ -40,7 +40,7 @@ class Team extends Controller $teams = auth()->user()->teams; $team = $teams->where('id', $id)->first(); if (is_null($team)) { - return response()->json(['error' => 'Team not found.', "docs" => "https://coolify.io/docs/api/team-by-id-members"], 404); + return response()->json(['error' => 'Team not found.', "docs" => "https://coolify.io/docs/api-reference/get-team-by-teamid-members"], 404); } return response()->json($team->members); } diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index ef210f16b..0c6b6eecb 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -737,7 +737,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted $nixpacks_php_root_dir = $this->application->environment_variables_preview->where('key', 'NIXPACKS_PHP_ROOT_DIR')->first(); } if ($nixpacks_php_fallback_path?->value === '/index.php' && $nixpacks_php_root_dir?->value === '/app/public' && $this->newVersionIsHealthy === false) { - $this->application_deployment_queue->addLogEntry("There was a change in how Laravel is deployed. Please update your environment variables to match the new deployment method. More details here: https://coolify.io/docs/frameworks/laravel#requirements", 'stderr'); + $this->application_deployment_queue->addLogEntry("There was a change in how Laravel is deployed. Please update your environment variables to match the new deployment method. More details here: https://coolify.io/docs/resources/laravel", 'stderr'); } } private function rolling_update() diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.php index b40826f97..333d46027 100644 --- a/app/Jobs/ContainerStatusJob.php +++ b/app/Jobs/ContainerStatusJob.php @@ -170,16 +170,13 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted })->first(); if (!$foundTcpProxy) { StartDatabaseProxy::run($service_db); - $this->server->team?->notify(new ContainerRestarted("TCP Proxy for {$service_db->service->name}", $this->server)); + // $this->server->team?->notify(new ContainerRestarted("TCP Proxy for {$service_db->service->name}", $this->server)); } } } } } else { $database = $databases->where('uuid', $uuid)->first(); - if ($uuid == 'postgresql') { - ray($database); - } if ($database) { $isPublic = data_get($database, 'is_public'); $foundDatabases[] = $database->id; @@ -187,7 +184,6 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted if ($statusFromDb !== $containerStatus) { $database->update(['status' => $containerStatus]); } - ray($database); if ($isPublic) { $foundTcpProxy = $containers->filter(function ($value, $key) use ($uuid) { if ($this->server->isSwarm()) { @@ -197,7 +193,6 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted } })->first(); if (!$foundTcpProxy) { - ray('asdffff'); StartDatabaseProxy::run($database); $this->server->team?->notify(new ContainerRestarted("TCP Proxy for {$database->name}", $this->server)); } diff --git a/app/Jobs/InstanceAutoUpdateJob.php b/app/Jobs/InstanceAutoUpdateJob.php index 99e0a34f3..fa5c29421 100644 --- a/app/Jobs/InstanceAutoUpdateJob.php +++ b/app/Jobs/InstanceAutoUpdateJob.php @@ -23,6 +23,6 @@ class InstanceAutoUpdateJob implements ShouldQueue, ShouldBeUnique, ShouldBeEncr public function handle(): void { - UpdateCoolify::run($this->force); + UpdateCoolify::run(force: $this->force, async: false); } } diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.php index 67f6c2115..9485cdd03 100644 --- a/app/Livewire/Project/Application/General.php +++ b/app/Livewire/Project/Application/General.php @@ -251,7 +251,7 @@ class General extends Component if ($this->application->additional_servers->count() === 0) { foreach ($domains as $domain) { if (!validate_dns_entry($domain, $this->application->destination->server)) { - $showToaster && $this->dispatch('error', "Validating DNS ($domain) failed.", "Make sure you have added the DNS records correctly.

Check this documentation for further help."); + $showToaster && $this->dispatch('error', "Validating DNS ($domain) failed.", "Make sure you have added the DNS records correctly.

Check this documentation for further help."); } } } diff --git a/app/Livewire/Project/Application/Heading.php b/app/Livewire/Project/Application/Heading.php index 3047f9f23..089eb5e9f 100644 --- a/app/Livewire/Project/Application/Heading.php +++ b/app/Livewire/Project/Application/Heading.php @@ -56,11 +56,11 @@ class Heading extends Component return; } if (data_get($this->application, 'settings.is_build_server_enabled') && str($this->application->docker_registry_image_name)->isEmpty()) { - $this->dispatch('error', 'Failed to deploy.', 'To use a build server, you must first set a Docker image.
More information here: documentation'); + $this->dispatch('error', 'Failed to deploy.', 'To use a build server, you must first set a Docker image.
More information here: documentation'); return; } if ($this->application->additional_servers->count() > 0 && str($this->application->docker_registry_image_name)->isEmpty()) { - $this->dispatch('error', 'Failed to deploy.', 'Before deploying to multiple servers, you must first set a Docker image in the General tab.
More information here: documentation'); + $this->dispatch('error', 'Failed to deploy.', 'Before deploying to multiple servers, you must first set a Docker image in the General tab.
More information here: documentation'); return; } $this->setDeploymentUuid(); @@ -99,7 +99,7 @@ class Heading extends Component public function restart() { if ($this->application->additional_servers->count() > 0 && str($this->application->docker_registry_image_name)->isEmpty()) { - $this->dispatch('error', 'Failed to deploy', 'Before deploying to multiple servers, you must first set a Docker image in the General tab.
More information here: documentation'); + $this->dispatch('error', 'Failed to deploy', 'Before deploying to multiple servers, you must first set a Docker image in the General tab.
More information here: documentation'); return; } $this->setDeploymentUuid(); diff --git a/app/Livewire/Project/New/Select.php b/app/Livewire/Project/New/Select.php index 00a243624..b1842547e 100644 --- a/app/Livewire/Project/New/Select.php +++ b/app/Livewire/Project/New/Select.php @@ -49,7 +49,6 @@ class Select extends Component } public function render() { - $this->loadServices(); return view('livewire.project.new.select'); } @@ -74,6 +73,7 @@ class Select extends Component public function loadServices(bool $force = false) { try { + $this->loadingServices = true; if (count($this->allServices) > 0 && !$force) { if (!$this->search) { $this->services = $this->allServices; diff --git a/app/Livewire/Project/Shared/Destination.php b/app/Livewire/Project/Shared/Destination.php index 787b9da20..fa19e8c42 100644 --- a/app/Livewire/Project/Shared/Destination.php +++ b/app/Livewire/Project/Shared/Destination.php @@ -56,7 +56,7 @@ class Destination extends Component public function redeploy(int $network_id, int $server_id) { if ($this->resource->additional_servers->count() > 0 && str($this->resource->docker_registry_image_name)->isEmpty()) { - $this->dispatch('error', 'Failed to deploy.', 'Before deploying to multiple servers, you must first set a Docker image in the General tab.
More information here: documentation'); + $this->dispatch('error', 'Failed to deploy.', 'Before deploying to multiple servers, you must first set a Docker image in the General tab.
More information here: documentation'); return; } $deployment_uuid = new Cuid2(7); diff --git a/app/Livewire/Server/Form.php b/app/Livewire/Server/Form.php index 098a7c1ff..ff9aaf701 100644 --- a/app/Livewire/Server/Form.php +++ b/app/Livewire/Server/Form.php @@ -82,7 +82,7 @@ class Form extends Component $this->server->settings->is_usable = true; $this->server->settings->save(); } else { - $this->dispatch('error', 'Server is not reachable.', 'Please validate your configuration and connection.

Check this documentation for further help.'); + $this->dispatch('error', 'Server is not reachable.', 'Please validate your configuration and connection.

Check this documentation for further help.'); return; } } diff --git a/app/Livewire/Server/ShowPrivateKey.php b/app/Livewire/Server/ShowPrivateKey.php index 43b55fbb6..d44d2cb5f 100644 --- a/app/Livewire/Server/ShowPrivateKey.php +++ b/app/Livewire/Server/ShowPrivateKey.php @@ -39,7 +39,7 @@ class ShowPrivateKey extends Component if ($uptime) { $this->dispatch('success', 'Server is reachable.'); } else { - $this->dispatch('error', 'Server is not reachable.
Please validate your configuration and connection.

Check this documentation for further help.'); + $this->dispatch('error', 'Server is not reachable.
Please validate your configuration and connection.

Check this documentation for further help.'); return; } } catch (\Throwable $e) { diff --git a/app/Livewire/Server/ValidateAndInstall.php b/app/Livewire/Server/ValidateAndInstall.php index ff623e972..6d4173956 100644 --- a/app/Livewire/Server/ValidateAndInstall.php +++ b/app/Livewire/Server/ValidateAndInstall.php @@ -75,7 +75,7 @@ class ValidateAndInstall extends Component { $this->uptime = $this->server->validateConnection(); if (!$this->uptime) { - $this->error = 'Server is not reachable. Please validate your configuration and connection.

Check this documentation for further help.'; + $this->error = 'Server is not reachable. Please validate your configuration and connection.

Check this documentation for further help.'; return; } $this->dispatch('validateOS'); diff --git a/app/Livewire/Settings/Email.php b/app/Livewire/Settings/Email.php index 3563e2e64..77b82df43 100644 --- a/app/Livewire/Settings/Email.php +++ b/app/Livewire/Settings/Email.php @@ -58,6 +58,8 @@ class Email extends Component try { $this->resetErrorBag(); $this->validate([ + 'settings.smtp_from_address' => 'required|email', + 'settings.smtp_from_name' => 'required', 'settings.resend_api_key' => 'required' ]); $this->settings->save(); @@ -90,6 +92,8 @@ class Email extends Component try { $this->resetErrorBag(); $this->validate([ + 'settings.smtp_from_address' => 'required|email', + 'settings.smtp_from_name' => 'required', 'settings.smtp_host' => 'required', 'settings.smtp_port' => 'required|numeric', 'settings.smtp_encryption' => 'nullable', diff --git a/app/Livewire/Upgrade.php b/app/Livewire/Upgrade.php index 0c6541d8f..37c2a64ef 100644 --- a/app/Livewire/Upgrade.php +++ b/app/Livewire/Upgrade.php @@ -37,8 +37,8 @@ class Upgrade extends Component return; } $this->showProgress = true; - UpdateCoolify::run(true); - $this->dispatch('success', "Upgrading to {$this->latestVersion} version..."); + UpdateCoolify::run(force: true, async: true); + $this->dispatch('success', "Updating Coolify to {$this->latestVersion} version..."); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/app/Notifications/Server/HighDiskUsage.php b/app/Notifications/Server/HighDiskUsage.php index d8794600d..33e49387e 100644 --- a/app/Notifications/Server/HighDiskUsage.php +++ b/app/Notifications/Server/HighDiskUsage.php @@ -53,13 +53,13 @@ class HighDiskUsage extends Notification implements ShouldQueue public function toDiscord(): string { - $message = "Coolify: Server '{$this->server->name}' high disk usage detected!\nDisk usage: {$this->disk_usage}%. Threshold: {$this->cleanup_after_percentage}%.\nPlease cleanup your disk to prevent data-loss.\nHere are some tips: https://coolify.io/docs/automated-cleanup."; + $message = "Coolify: Server '{$this->server->name}' high disk usage detected!\nDisk usage: {$this->disk_usage}%. Threshold: {$this->cleanup_after_percentage}%.\nPlease cleanup your disk to prevent data-loss.\nHere are some tips: https://coolify.io/docs/knowledge-base/server/automated-cleanup."; return $message; } public function toTelegram(): array { return [ - "message" => "Coolify: Server '{$this->server->name}' high disk usage detected!\nDisk usage: {$this->disk_usage}%. Threshold: {$this->cleanup_after_percentage}%.\nPlease cleanup your disk to prevent data-loss.\nHere are some tips: https://coolify.io/docs/automated-cleanup." + "message" => "Coolify: Server '{$this->server->name}' high disk usage detected!\nDisk usage: {$this->disk_usage}%. Threshold: {$this->cleanup_after_percentage}%.\nPlease cleanup your disk to prevent data-loss.\nHere are some tips: https://coolify.io/docs/knowledge-base/server/automated-cleanup." ]; } } diff --git a/bootstrap/helpers/api.php b/bootstrap/helpers/api.php index 4fcdbac4f..46c0caa0a 100644 --- a/bootstrap/helpers/api.php +++ b/bootstrap/helpers/api.php @@ -7,5 +7,5 @@ function get_team_id_from_token() } function invalid_token() { - return response()->json(['error' => 'Invalid token.', 'docs' => 'https://coolify.io/docs/api/authentication'], 400); + return response()->json(['error' => 'Invalid token.', 'docs' => 'https://coolify.io/docs/api-reference/authorization'], 400); } diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index bfff8098a..023a65107 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -110,7 +110,7 @@ function handleError(?Throwable $error = null, ?Livewire\Component $livewire = n ray($error); if ($error instanceof TooManyRequestsException) { if (isset($livewire)) { - return $livewire->dispatch('error', 'Too many requests. Please try again in {$error->secondsUntilAvailable} seconds.'); + return $livewire->dispatch('error', "Too many requests. Please try again in {$error->secondsUntilAvailable} seconds."); } return "Too many requests. Please try again in {$error->secondsUntilAvailable} seconds."; } @@ -944,11 +944,10 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal if (!$isDatabase) { if ($savedService->fqdn) { - $fqdn = $savedService->fqdn . ',' . $fqdn; + data_set($savedService, 'fqdn', $savedService->fqdn . ',' . $fqdn); } else { - $fqdn = $fqdn; + data_set($savedService, 'fqdn', $fqdn); } - $savedService->fqdn = $fqdn; $savedService->save(); } EnvironmentVariable::create([ @@ -960,7 +959,6 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal ]); } // Caddy needs exact port in some cases. - if ($predefinedPort && !$key->endsWith("_{$predefinedPort}")) { if ($resource->server->proxyType() === 'CADDY') { $env = EnvironmentVariable::where([ @@ -1459,13 +1457,13 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal ])->first(); $value = Str::of(replaceVariables($value)); $key = $value; - if ($value->startsWith('SERVICE_')) { $foundEnv = EnvironmentVariable::where([ 'key' => $key, 'application_id' => $resource->id, ])->first(); ['command' => $command, 'forService' => $forService, 'generatedValue' => $generatedValue, 'port' => $port] = parseEnvVariable($value); + ray($command, $generatedValue); if (!is_null($command)) { if ($command?->value() === 'FQDN' || $command?->value() === 'URL') { if (Str::lower($forService) === $serviceName) { diff --git a/config/sentry.php b/config/sentry.php index ec6abd3c9..295643a93 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.245', + 'release' => '4.0.0-beta.246', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index 8b2443f54..c7cc17991 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ -
-
-
- -
Coolify
-
- {{-- --}} +
+
+ + Coolify +
+ {{ __('auth.forgot_password') }}
- -
-

{{ __('auth.forgot_password') }}

-
-
- @if (is_transactional_emails_active()) +
+
+ @if (is_transactional_emails_active())
@csrf @@ -37,7 +34,9 @@ {{ session('status') }}
@endif +
-
+ + diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php index 07f0e885e..aae13b4c8 100644 --- a/resources/views/components/navbar.blade.php +++ b/resources/views/components/navbar.blade.php @@ -1,5 +1,14 @@
-
diff --git a/resources/views/components/resource-view.blade.php b/resources/views/components/resource-view.blade.php index 6857a0dc0..d6cc12026 100644 --- a/resources/views/components/resource-view.blade.php +++ b/resources/views/components/resource-view.blade.php @@ -1,7 +1,7 @@
!$upgrade, - 'hover:border-red-500 cursor-not-allowed' => $upgrade, + 'transition-all duration-150 box-without-bg dark:bg-coolgray-100 bg-white group', + 'hover:border-l-coollabs cursor-pointer' => !$upgrade, + 'hover:border-l-red-500 cursor-not-allowed' => $upgrade, ]) @if (!$upgrade) wire:click={{ $wire }} @endif>
{{ $logo }} diff --git a/resources/views/emails/high-disk-usage.blade.php b/resources/views/emails/high-disk-usage.blade.php index 5330ebd7f..3d57d228d 100644 --- a/resources/views/emails/high-disk-usage.blade.php +++ b/resources/views/emails/high-disk-usage.blade.php @@ -1,7 +1,7 @@ Your server ({{ $name }}) has high disk usage ({{ $disk_usage }}% used). Threshold is {{ $threshold }}%. -Please cleanup your disk to prevent data-loss. Here are some [tips](https://coolify.io/docs/automated-cleanup). +Please cleanup your disk to prevent data-loss. Here are some [tips](https://coolify.io/docs/knowledge-base/server/automated-cleanup). (You can change the threshold in the Server Settings menu.) diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 744f33739..caed5ff3a 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -5,7 +5,12 @@ @endif @auth -
+