revert: wip
This commit is contained in:
parent
ac13ba0957
commit
810b55163c
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
use Illuminate\Broadcasting\Channel;
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Broadcasting\PresenceChannel;
|
||||
use Illuminate\Broadcasting\PrivateChannel;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ApplicationDeploymentFinished implements ShouldBroadcast
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
public ?int $teamId = null;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*/
|
||||
public function __construct(public ?string $applicationUuid = null, public ?string $status = null)
|
||||
{
|
||||
$this->teamId = auth()->user()->currentTeam()->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the channels the event should broadcast on.
|
||||
*
|
||||
* @return array<int, \Illuminate\Broadcasting\Channel>
|
||||
*/
|
||||
public function broadcastOn(): array
|
||||
{
|
||||
return [
|
||||
new PrivateChannel("custom.{$this->teamId}"),
|
||||
];
|
||||
}
|
||||
}
|
@ -11,24 +11,11 @@
|
||||
|
||||
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();
|
||||
|
@ -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 @@ public function handle()
|
||||
});
|
||||
}
|
||||
$this->next(ApplicationDeploymentStatus::FINISHED->value);
|
||||
ApplicationDeploymentFinished::dispatch($this->application->uuid, ApplicationDeploymentStatus::FINISHED->value);
|
||||
} catch (Throwable $exception) {
|
||||
$this->fail($exception);
|
||||
} finally {
|
||||
|
@ -194,7 +194,7 @@
|
||||
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,
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -45,18 +45,18 @@ class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400"
|
||||
</svg>
|
||||
Restart
|
||||
</button>
|
||||
@if(isDev())
|
||||
<button title="Restart without rebuilding" wire:click='restartNew'
|
||||
class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
|
||||
<svg class="w-5 h-5 text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
||||
stroke-width="2">
|
||||
<path d="M19.933 13.041a8 8 0 1 1-9.925-8.788c3.899-1 7.935 1.007 9.425 4.747" />
|
||||
<path d="M20 4v5h-5" />
|
||||
</g>
|
||||
</svg>
|
||||
Restart (new)
|
||||
</button>
|
||||
@if (isDev())
|
||||
<button title="Restart without rebuilding" wire:click='restartNew'
|
||||
class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
|
||||
<svg class="w-5 h-5 text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
||||
stroke-width="2">
|
||||
<path d="M19.933 13.041a8 8 0 1 1-9.925-8.788c3.899-1 7.935 1.007 9.425 4.747" />
|
||||
<path d="M20 4v5h-5" />
|
||||
</g>
|
||||
</svg>
|
||||
Restart (new)
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
<button wire:click='stop' class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<nav x-init="$wire.check_status">
|
||||
<nav x-init="$wire.check_status" wire:poll.10000ms="check_status">
|
||||
<x-resources.breadcrumbs :resource="$application" :parameters="$parameters" />
|
||||
<x-applications.navbar :application="$application" :parameters="$parameters" />
|
||||
</nav>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
use App\Events\ApplicationDeploymentFinished;
|
||||
use App\Http\Controllers\ApplicationController;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Controllers\DatabaseController;
|
||||
@ -40,11 +39,6 @@
|
||||
use Laravel\Fortify\Contracts\SuccessfulPasswordResetLinkRequestResponse;
|
||||
use Laravel\Fortify\Fortify;
|
||||
|
||||
Route::get('/fire', function () {
|
||||
ApplicationDeploymentFinished::dispatch('kk0gg0s', 'stopped');
|
||||
|
||||
return 'Event has been sent!';
|
||||
});
|
||||
if (isDev()) {
|
||||
Route::get('/dev/compose', Compose::class)->name('dev.compose');
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
## Do not modify this file. You will lost the ability to autoupdate!
|
||||
|
||||
VERSION="1.0.3"
|
||||
VERSION="1.0.4"
|
||||
CDN="https://cdn.coollabs.io/coolify"
|
||||
|
||||
curl -fsSL $CDN/docker-compose.yml -o /data/coolify/source/docker-compose.yml
|
||||
@ -9,7 +9,29 @@ curl -fsSL $CDN/docker-compose.prod.yml -o /data/coolify/source/docker-compose.p
|
||||
curl -fsSL $CDN/.env.production -o /data/coolify/source/.env.production
|
||||
|
||||
# Merge .env and .env.production. New values will be added to .env
|
||||
sort -u -t '=' -k 1,1 /data/coolify/source/.env /data/coolify/source/.env.production | sed '/^$/d' > /data/coolify/source/.env.temp && mv /data/coolify/source/.env.temp /data/coolify/source/.env
|
||||
sort -u -t '=' -k 1,1 /data/coolify/source/.env /data/coolify/source/.env.production | sed '/^$/d' >/data/coolify/source/.env.temp && mv /data/coolify/source/.env.temp /data/coolify/source/.env
|
||||
|
||||
# Check if PUSHER_APP_ID or PUSHER_APP_KEY or PUSHER_APP_SECRET is empty in /data/coolify/source/.env
|
||||
# if grep -q "PUSHER_APP_ID=$" /data/coolify/source/.env; then
|
||||
# echo "PUSHER_APP_ID is not set in .env"
|
||||
# sed -i "s|PUSHER_APP_ID=.*|PUSHER_APP_ID=$(openssl rand -hex 32)|g" /data/coolify/source/.env
|
||||
# else
|
||||
# echo "PUSHER_APP_ID is set in .env"
|
||||
# fi
|
||||
|
||||
# if grep -q "PUSHER_APP_KEY=$" /data/coolify/source/.env; then
|
||||
# echo "PUSHER_APP_KEY is not set in .env"
|
||||
# sed -i "s|PUSHER_APP_KEY=.*|PUSHER_APP_KEY=$(openssl rand -hex 32)|g" /data/coolify/source/.env
|
||||
# else
|
||||
# echo "PUSHER_APP_KEY is set in .env"
|
||||
# fi
|
||||
|
||||
# if grep -q "PUSHER_APP_SECRET=$" /data/coolify/source/.env; then
|
||||
# echo "PUSHER_APP_SECRET is not set in .env"
|
||||
# sed -i "s|PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|g" /data/coolify/source/.env
|
||||
# else
|
||||
# echo "PUSHER_APP_SECRET is set in .env"
|
||||
# fi
|
||||
|
||||
# Make sure coolify network exists
|
||||
docker network create --attachable coolify 2>/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user