diff --git a/app/Events/ApplicationDeploymentFinished.php b/app/Events/ApplicationDeploymentFinished.php deleted file mode 100644 index fb43f72c5..000000000 --- a/app/Events/ApplicationDeploymentFinished.php +++ /dev/null @@ -1,38 +0,0 @@ -teamId = auth()->user()->currentTeam()->id; - } - - /** - * Get the channels the event should broadcast on. - * - * @return array - */ - public function broadcastOn(): array - { - return [ - new PrivateChannel("custom.{$this->teamId}"), - ]; - } -} diff --git a/app/Http/Livewire/Project/Application/Heading.php b/app/Http/Livewire/Project/Application/Heading.php index 9a212867a..3d5af34da 100644 --- a/app/Http/Livewire/Project/Application/Heading.php +++ b/app/Http/Livewire/Project/Application/Heading.php @@ -11,24 +11,11 @@ use Visus\Cuid2\Cuid2; class Heading extends Component { - protected string $deploymentUuid; public Application $application; public array $parameters; - public function getListeners() - { - $teamId = auth()->user()->currentTeam()->id; - return [ - "echo-private:custom.{$teamId},ApplicationDeploymentFinished" => 'updateStatus', - ]; - } - public function updateStatus($message) - { - $applicationUuid = data_get($message, 'applicationUuid'); - if ($this->application->uuid === $applicationUuid) { - $this->application->status = data_get($message, 'status'); - } - } + protected string $deploymentUuid; + public function mount() { $this->parameters = get_route_parameters(); diff --git a/app/Jobs/ApplicationDeploymentNewJob.php b/app/Jobs/ApplicationDeploymentNewJob.php index 40301bbe9..94b9a4e27 100644 --- a/app/Jobs/ApplicationDeploymentNewJob.php +++ b/app/Jobs/ApplicationDeploymentNewJob.php @@ -3,33 +3,18 @@ namespace App\Jobs; use App\Enums\ApplicationDeploymentStatus; -use App\Enums\ProxyTypes; -use App\Events\ApplicationDeploymentFinished; use App\Models\Application; use App\Models\ApplicationDeploymentQueue; -use App\Models\ApplicationPreview; -use App\Models\GithubApp; -use App\Models\GitlabApp; use App\Models\Server; -use App\Models\StandaloneDocker; -use App\Models\SwarmDocker; -use App\Notifications\Application\DeploymentFailed; -use App\Notifications\Application\DeploymentSuccess; use App\Traits\ExecuteRemoteCommand; -use Exception; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldBeEncrypted; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Illuminate\Support\Collection; -use Illuminate\Support\Str; use RuntimeException; -use Spatie\Url\Url; -use Symfony\Component\Yaml\Yaml; use Throwable; -use Visus\Cuid2\Cuid2; class ApplicationDeploymentNewJob implements ShouldQueue, ShouldBeEncrypted { @@ -102,7 +87,6 @@ class ApplicationDeploymentNewJob implements ShouldQueue, ShouldBeEncrypted }); } $this->next(ApplicationDeploymentStatus::FINISHED->value); - ApplicationDeploymentFinished::dispatch($this->application->uuid, ApplicationDeploymentStatus::FINISHED->value); } catch (Throwable $exception) { $this->fail($exception); } finally { diff --git a/config/app.php b/config/app.php index 5851640be..246ad1f99 100644 --- a/config/app.php +++ b/config/app.php @@ -194,7 +194,7 @@ return [ App\Providers\AppServiceProvider::class, App\Providers\FortifyServiceProvider::class, App\Providers\AuthServiceProvider::class, - App\Providers\BroadcastServiceProvider::class, + // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\HorizonServiceProvider::class, App\Providers\RouteServiceProvider::class, diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index d52c83b7d..510ebb020 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -21,7 +21,7 @@ services: SSL_MODE: "off" AUTORUN_LARAVEL_STORAGE_LINK: "false" AUTORUN_LARAVEL_MIGRATION: "false" - PUSHER_HOST: "${PUSHER_HOST:-127.0.0.1}" + PUSHER_HOST: "coolify-soketi" PUSHER_APP_ID: "${PUSHER_APP_ID:-coolify}" PUSHER_APP_KEY: "${PUSHER_APP_KEY:-coolify}" PUSHER_APP_SECRET: "${PUSHER_APP_SECRET:-coolify}" @@ -48,23 +48,21 @@ services: volumes: - /data/coolify/_volumes/redis/:/data # - coolify-redis-data-dev:/data - soketi: - env_file: - - .env - ports: - - "${FORWARD_SOKETI_PORT:-6001}:6001" - environment: - SOKETI_DEBUG: "true" - SOKETI_DEFAULT_APP_ID: "${PUSHER_APP_ID:-coolify}" - SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY:-coolify}" - SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET:-coolify}" + # soketi: + # env_file: + # - .env + # ports: + # - "${FORWARD_SOKETI_PORT:-6001}:6001" + # environment: + # SOKETI_DEBUG: "true" + # SOKETI_DEFAULT_APP_ID: "${PUSHER_APP_ID:-coolify}" + # SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY:-coolify}" + # SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET:-coolify}" vite: image: node:20 working_dir: /var/www/html environment: - VITE_PUSHER_HOST: "${PUSHER_HOST:-127.0.0.1}" VITE_PUSHER_APP_KEY: "${PUSHER_APP_KEY:-coolify}" - VITE_PUSHER_PORT: "${FORWARD_SOKETI_PORT:-6001}" ports: - "${VITE_PORT:-5173}:${VITE_PORT:-5173}" volumes: diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 4ba513d5a..96b5193fd 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -35,13 +35,6 @@ services: - PHP_PM_START_SERVERS=1 - PHP_PM_MIN_SPARE_SERVERS=1 - PHP_PM_MAX_SPARE_SERVERS=10 - - PUSHER_HOST - - PUSHER_APP_ID - - PUSHER_APP_KEY - - PUSHER_APP_SECRET - - VITE_PUSHER_HOST - - VITE_PUSHER_APP_KEY - - VITE_PUSHER_PORT - SELF_HOSTED - WAITLIST - SUBSCRIPTION_PROVIDER diff --git a/docker-compose.yml b/docker-compose.yml index 2509f6fc8..ab900f5f9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,12 +24,12 @@ services: restart: always networks: - coolify - soketi: - image: 'quay.io/soketi/soketi:latest-16-alpine' - container_name: coolify-soketi - restart: always - networks: - - coolify + # soketi: + # image: 'quay.io/soketi/soketi:latest-16-alpine' + # container_name: coolify-soketi + # restart: always + # networks: + # - coolify networks: coolify: name: coolify diff --git a/resources/js/app.js b/resources/js/app.js index 33a3cce43..869794ae3 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1,25 +1,25 @@ import Alpine from "alpinejs"; -import Echo from 'laravel-echo'; -import Pusher from 'pusher-js'; +// import Echo from 'laravel-echo'; +// import Pusher from 'pusher-js'; import { createApp } from "vue"; import MagicBar from "./components/MagicBar.vue"; import Toaster from "../../vendor/masmerise/livewire-toaster/resources/js"; -window.Pusher = Pusher; +// window.Pusher = Pusher; -window.Echo = new Echo({ - broadcaster: 'pusher', - cluster: window.location.hostname, - key: import.meta.env.VITE_PUSHER_APP_KEY ?? 'coolify', - wsHost: window.location.hostname, - wsPort: 6001, - wssPort: 6001, - forceTLS: false, - encrypted: true, - disableStats: false, - enableLogging: true, - enabledTransports: ['ws', 'wss'], -}); +// window.Echo = new Echo({ +// broadcaster: 'pusher', +// cluster: window.location.hostname, +// key: import.meta.env.VITE_PUSHER_APP_KEY ?? 'coolify', +// wsHost: window.location.hostname, +// wsPort: 6001, +// wssPort: 6001, +// forceTLS: false, +// encrypted: true, +// disableStats: false, +// enableLogging: true, +// enabledTransports: ['ws', 'wss'], +// }); Alpine.plugin(Toaster); diff --git a/resources/views/components/applications/navbar.blade.php b/resources/views/components/applications/navbar.blade.php index 98ddb8d5f..457e90604 100644 --- a/resources/views/components/applications/navbar.blade.php +++ b/resources/views/components/applications/navbar.blade.php @@ -45,18 +45,18 @@ Restart - @if(isDev()) - + @if (isDev()) + @endif @endif