refactor a lot of things

fix: postgres_passwords could be longer
feat: able to define postgresql databases from the ui
This commit is contained in:
Andras Bacsai 2023-08-09 15:57:53 +02:00
parent d18de24cf9
commit a378b5108e
42 changed files with 167 additions and 92 deletions

View File

@ -150,7 +150,7 @@ class StartPostgresql
private function generate_init_scripts() private function generate_init_scripts()
{ {
if (count($this->database->init_scripts) === 0) { if (is_null($this->database->init_scripts) || count($this->database->init_scripts) === 0) {
return; return;
} }
foreach ($this->database->init_scripts as $init_script) { foreach ($this->database->init_scripts as $init_script) {

View File

@ -18,7 +18,7 @@ class CheckResaleLicense
return; return;
} }
$base_url = config('coolify.license_url'); $base_url = config('coolify.license_url');
if (isDev()) { if (is_dev()) {
$base_url = 'http://host.docker.internal:8787'; $base_url = 'http://host.docker.internal:8787';
} }
$instance_id = config('app.id'); $instance_id = config('app.id');

View File

@ -17,7 +17,7 @@ class UpdateCoolify
$settings = InstanceSettings::get(); $settings = InstanceSettings::get();
ray('Running InstanceAutoUpdateJob'); ray('Running InstanceAutoUpdateJob');
$localhost_name = 'localhost'; $localhost_name = 'localhost';
if (isDev()) { if (is_dev()) {
$localhost_name = 'testing-local-docker-container'; $localhost_name = 'testing-local-docker-container';
} }
$this->server = Server::where('name', $localhost_name)->firstOrFail(); $this->server = Server::where('name', $localhost_name)->firstOrFail();
@ -52,7 +52,7 @@ class UpdateCoolify
private function update() private function update()
{ {
if (isDev()) { if (is_dev()) {
ray("Running update on local docker container. Updating to $this->latest_version"); ray("Running update on local docker container. Updating to $this->latest_version");
remote_process([ remote_process([
"sleep 10" "sleep 10"

View File

@ -18,7 +18,7 @@ class Kernel extends ConsoleKernel
protected function schedule(Schedule $schedule): void protected function schedule(Schedule $schedule): void
{ {
// $schedule->call(fn() => $this->check_scheduled_backups($schedule))->everyTenSeconds(); // $schedule->call(fn() => $this->check_scheduled_backups($schedule))->everyTenSeconds();
if (isDev()) { if (is_dev()) {
$schedule->command('horizon:snapshot')->everyMinute(); $schedule->command('horizon:snapshot')->everyMinute();
$schedule->job(new InstanceApplicationsStatusJob)->everyMinute(); $schedule->job(new InstanceApplicationsStatusJob)->everyMinute();
$schedule->job(new ProxyCheckJob)->everyFiveMinutes(); $schedule->job(new ProxyCheckJob)->everyFiveMinutes();

View File

@ -45,7 +45,7 @@ class Handler extends ExceptionHandler
{ {
$this->reportable(function (Throwable $e) { $this->reportable(function (Throwable $e) {
$this->settings = InstanceSettings::get(); $this->settings = InstanceSettings::get();
if ($this->settings->do_not_track || isDev()) { if ($this->settings->do_not_track || is_dev()) {
return; return;
} }
Integration::captureUnhandledException($e); Integration::captureUnhandledException($e);

View File

@ -19,7 +19,7 @@ class Controller extends BaseController
public function subscription() public function subscription()
{ {
if (!isCloud()) { if (!is_cloud()) {
abort(404); abort(404);
} }
return view('subscription', [ return view('subscription', [
@ -29,7 +29,7 @@ class Controller extends BaseController
public function license() public function license()
{ {
if (!isCloud()) { if (!is_cloud()) {
abort(404); abort(404);
} }
return view('settings.license', [ return view('settings.license', [

View File

@ -41,6 +41,9 @@ class ProjectController extends Controller
public function new() public function new()
{ {
$type = request()->query('type');
$destination_uuid = request()->query('destination');
$project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first(); $project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first();
if (!$project) { if (!$project) {
return redirect()->route('dashboard'); return redirect()->route('dashboard');
@ -49,9 +52,14 @@ class ProjectController extends Controller
if (!$environment) { if (!$environment) {
return redirect()->route('dashboard'); return redirect()->route('dashboard');
} }
if (in_array($type, DATABASE_TYPES)) {
$type = request()->query('type'); $standalone_postgresql = create_standalone_postgresql($environment->id, $destination_uuid);
return redirect()->route('project.database.configuration', [
'project_uuid' => $project->uuid,
'environment_name' => $environment->name,
'database_uuid' => $standalone_postgresql->uuid,
]);
}
return view('project.new', [ return view('project.new', [
'type' => $type 'type' => $type
]); ]);

View File

@ -17,7 +17,7 @@ class Heading extends Component
public function mount() public function mount()
{ {
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
public function check_status() public function check_status()

View File

@ -20,7 +20,7 @@ class Previews extends Component
public function mount() public function mount()
{ {
$this->pull_requests = collect(); $this->pull_requests = collect();
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
public function loadStatus($pull_request_id) public function loadStatus($pull_request_id)

View File

@ -16,7 +16,7 @@ class Rollback extends Component
public function mount() public function mount()
{ {
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
public function rollbackImage($commit) public function rollbackImage($commit)

View File

@ -34,7 +34,7 @@ class Heading extends Component
public function mount() public function mount()
{ {
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
public function stop() public function stop()

View File

@ -12,7 +12,7 @@ class DeleteEnvironment extends Component
public function mount() public function mount()
{ {
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
public function delete() public function delete()

View File

@ -12,7 +12,7 @@ class DeleteProject extends Component
public function mount() public function mount()
{ {
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
public function delete() public function delete()

View File

@ -38,7 +38,7 @@ class GithubPrivateRepository extends Component
public function mount() public function mount()
{ {
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
$this->query = request()->query(); $this->query = request()->query();
$this->repositories = $this->branches = collect(); $this->repositories = $this->branches = collect();
$this->github_apps = GithubApp::private(); $this->github_apps = GithubApp::private();

View File

@ -50,10 +50,10 @@ class GithubPrivateRepositoryDeployKey extends Component
public function mount() public function mount()
{ {
if (isDev()) { if (is_dev()) {
$this->repository_url = 'https://github.com/coollabsio/coolify-examples'; $this->repository_url = 'https://github.com/coollabsio/coolify-examples';
} }
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
$this->query = request()->query(); $this->query = request()->query();
$this->private_keys = PrivateKey::where('team_id', session('currentTeam')->id)->where('id', '!=', 0)->get(); $this->private_keys = PrivateKey::where('team_id', session('currentTeam')->id)->where('id', '!=', 0)->get();
} }

View File

@ -45,11 +45,11 @@ class PublicGitRepository extends Component
public function mount() public function mount()
{ {
if (isDev()) { if (is_dev()) {
$this->repository_url = 'https://github.com/coollabsio/coolify-examples'; $this->repository_url = 'https://github.com/coollabsio/coolify-examples';
$this->port = 3000; $this->port = 3000;
} }
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
$this->query = request()->query(); $this->query = request()->query();
} }

View File

@ -17,7 +17,7 @@ class Select extends Component
public function mount() public function mount()
{ {
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
public function set_type(string $type) public function set_type(string $type)

View File

@ -14,7 +14,7 @@ class Danger extends Component
public function mount() public function mount()
{ {
$this->modalId = new Cuid2(7); $this->modalId = new Cuid2(7);
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
public function delete() public function delete()

View File

@ -26,7 +26,7 @@ class Add extends Component
public function mount() public function mount()
{ {
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
public function submit() public function submit()

View File

@ -25,7 +25,7 @@ class Show extends Component
public function mount() public function mount()
{ {
$this->modalId = new Cuid2(7); $this->modalId = new Cuid2(7);
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
public function submit() public function submit()

View File

@ -25,7 +25,7 @@ class Add extends Component
public function mount() public function mount()
{ {
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
public function submit() public function submit()

View File

@ -39,6 +39,6 @@ class PrivateKey extends Component
public function mount() public function mount()
{ {
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
} }
} }

View File

@ -38,7 +38,7 @@ class Change extends Component
public function mount() public function mount()
{ {
$this->webhook_endpoint = $this->ipv4; $this->webhook_endpoint = $this->ipv4;
$this->parameters = getRouteParameters(); $this->parameters = get_route_parameters();
$this->is_system_wide = $this->github_app->is_system_wide; $this->is_system_wide = $this->github_app->is_system_wide;
} }

View File

@ -15,7 +15,7 @@ class InviteLink extends Component
public function mount() public function mount()
{ {
$this->email = isDev() ? 'test3@example.com' : ''; $this->email = is_dev() ? 'test3@example.com' : '';
} }
public function viaEmail() public function viaEmail()

View File

@ -36,7 +36,7 @@ class Create extends Component
public function mount() public function mount()
{ {
if (isDev()) { if (is_dev()) {
$this->name = 'Local MinIO'; $this->name = 'Local MinIO';
$this->description = 'Local MinIO'; $this->description = 'Local MinIO';
$this->key = 'minioadmin'; $this->key = 'minioadmin';

View File

@ -18,7 +18,7 @@ class Upgrade extends Component
$this->latestVersion = get_latest_version_of_coolify(); $this->latestVersion = get_latest_version_of_coolify();
$currentVersion = config('version'); $currentVersion = config('version');
version_compare($currentVersion, $this->latestVersion, '<') ? $this->isUpgradeAvailable = true : $this->isUpgradeAvailable = false; version_compare($currentVersion, $this->latestVersion, '<') ? $this->isUpgradeAvailable = true : $this->isUpgradeAvailable = false;
if (isDev()) { if (is_dev()) {
$this->isUpgradeAvailable = true; $this->isUpgradeAvailable = true;
} }
$settings = InstanceSettings::get(); $settings = InstanceSettings::get();

View File

@ -12,7 +12,7 @@ class SubscriptionValid
public function handle(Request $request, Closure $next): Response public function handle(Request $request, Closure $next): Response
{ {
if (auth()->user()) { if (auth()->user()) {
if (isCloud() && !isSubscribed()) { if (is_cloud() && !isSubscribed()) {
ray('SubscriptionValid Middleware'); ray('SubscriptionValid Middleware');
$allowed_paths = [ $allowed_paths = [

View File

@ -32,7 +32,7 @@ class DockerCleanupJob implements ShouldQueue
try { try {
$servers = Server::all(); $servers = Server::all();
foreach ($servers as $server) { foreach ($servers as $server) {
if (isDev()) { if (is_dev()) {
$docker_root_filesystem = "/"; $docker_root_filesystem = "/";
} else { } else {
$docker_root_filesystem = instant_remote_process(['stat --printf=%m $(docker info --format "{{json .DockerRootDir}}" |sed \'s/"//g\')'], $server); $docker_root_filesystem = instant_remote_process(['stat --printf=%m $(docker info --format "{{json .DockerRootDir}}" |sed \'s/"//g\')'], $server);

View File

@ -0,0 +1,3 @@
<?php
const DATABASE_TYPES = ['postgresql'];

View File

@ -0,0 +1,28 @@
<?php
use App\Models\StandaloneDocker;
use App\Models\StandalonePostgresql;
use Visus\Cuid2\Cuid2;
function generate_database_name(string $type): string
{
$cuid = new Cuid2(7);
return $type . '-database-' . $cuid;
}
function create_standalone_postgresql($environment_id, $destination_uuid): StandalonePostgresql
{
// TODO: If another type of destination is added, this will need to be updated.
$destination = StandaloneDocker::where('uuid', $destination_uuid)->first();
if (!$destination) {
throw new Exception('Destination not found');
}
return StandalonePostgresql::create([
'name' => generate_database_name('postgresql'),
'postgres_password' => \Illuminate\Support\Str::password(),
'environment_id' => $environment_id,
'destination_id' => $destination->id,
'destination_type' => $destination->getMorphClass(),
]);
}

View File

@ -13,7 +13,7 @@ function get_proxy_path()
function generate_default_proxy_configuration(Server $server) function generate_default_proxy_configuration(Server $server)
{ {
$proxy_path = get_proxy_path(); $proxy_path = get_proxy_path();
if (isDev()) { if (is_dev()) {
$proxy_path = config('coolify.dev_config_path') . '/' . $server->name . '/proxy'; $proxy_path = config('coolify.dev_config_path') . '/' . $server->name . '/proxy';
} }
$networks = collect($server->standaloneDockers)->map(function ($docker) { $networks = collect($server->standaloneDockers)->map(function ($docker) {
@ -85,7 +85,7 @@ function generate_default_proxy_configuration(Server $server)
], ],
], ],
]; ];
if (isDev()) { if (is_dev()) {
$config['services']['traefik']['command'][] = "--log.level=debug"; $config['services']['traefik']['command'][] = "--log.level=debug";
} }
return Yaml::dump($config, 4, 2); return Yaml::dump($config, 4, 2);

View File

@ -5,37 +5,45 @@ use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Nubs\RandomNameGenerator\All;
use Visus\Cuid2\Cuid2; use Visus\Cuid2\Cuid2;
function application_configuration_dir() :string { function application_configuration_dir(): string
{
return '/data/coolify/applications'; return '/data/coolify/applications';
} }
function database_configuration_dir(): string {
function database_configuration_dir(): string
{
return '/data/coolify/databases'; return '/data/coolify/databases';
} }
function backup_dir(): string {
function backup_dir(): string
{
return '/data/coolify/backups'; return '/data/coolify/backups';
} }
function generate_readme_file(string $name, string $updated_at): string {
return "Resource name: {$name}\nLatest Deployment Date: {$updated_at}"; function generate_readme_file(string $name, string $updated_at): string
{
return "Resource name: $name\nLatest Deployment Date: $updated_at";
} }
function general_error_handler(\Throwable|null $err = null, $that = null, $isJson = false, $customErrorMessage = null) function general_error_handler(Throwable|null $err = null, $that = null, $isJson = false, $customErrorMessage = null): mixed
{ {
try { try {
ray('ERROR OCCURED: ' . $err->getMessage()); ray('ERROR OCCURRED: ' . $err->getMessage());
if ($err instanceof QueryException) { if ($err instanceof QueryException) {
if ($err->errorInfo[0] === '23505') { if ($err->errorInfo[0] === '23505') {
throw new \Exception($customErrorMessage ?? 'Duplicate entry found.', '23505'); throw new Exception($customErrorMessage ?? 'Duplicate entry found.', '23505');
} else if (count($err->errorInfo) === 4) { } else if (count($err->errorInfo) === 4) {
throw new \Exception($customErrorMessage ?? $err->errorInfo[3]); throw new Exception($customErrorMessage ?? $err->errorInfo[3]);
} else { } else {
throw new \Exception($customErrorMessage ?? $err->errorInfo[2]); throw new Exception($customErrorMessage ?? $err->errorInfo[2]);
} }
} else { } else {
throw new \Exception($customErrorMessage ?? $err->getMessage()); throw new Exception($customErrorMessage ?? $err->getMessage());
} }
} catch (\Throwable $error) { } catch (Throwable $error) {
if ($that) { if ($that) {
return $that->emit('error', $customErrorMessage ?? $error->getMessage()); return $that->emit('error', $customErrorMessage ?? $error->getMessage());
} elseif ($isJson) { } elseif ($isJson) {
@ -46,51 +54,54 @@ function general_error_handler(\Throwable|null $err = null, $that = null, $isJso
} else { } else {
ray($customErrorMessage); ray($customErrorMessage);
ray($error); ray($error);
return $customErrorMessage ?? $error->getMessage();
} }
} }
} }
function getRouteParameters() function get_route_parameters(): array
{ {
return Route::current()->parameters(); return Route::current()->parameters();
} }
function get_latest_version_of_coolify() function get_latest_version_of_coolify(): string
{ {
try { try {
$response = Http::get('https://cdn.coollabs.io/coolify/versions.json'); $response = Http::get('https://cdn.coollabs.io/coolify/versions.json');
$versions = $response->json(); $versions = $response->json();
return data_get($versions, 'coolify.v4.version'); return data_get($versions, 'coolify.v4.version');
} catch (\Throwable $th) { } catch (Throwable $th) {
//throw $th; //throw $th;
ray($th->getMessage()); ray($th->getMessage());
return '0.0.0'; return '0.0.0';
} }
} }
function generate_random_name() function generate_random_name(): string
{ {
$generator = \Nubs\RandomNameGenerator\All::create(); $generator = All::create();
$cuid = new Cuid2(7); $cuid = new Cuid2(7);
return Str::kebab("{$generator->getName()}-{$cuid}"); return Str::kebab("{$generator->getName()}-$cuid");
} }
function generate_application_name(string $git_repository, string $git_branch) function generate_application_name(string $git_repository, string $git_branch): string
{ {
$cuid = new Cuid2(7); $cuid = new Cuid2(7);
return Str::kebab("{$git_repository}:{$git_branch}-{$cuid}"); return Str::kebab("$git_repository:$git_branch-$cuid");
} }
function is_transactional_emails_active() function is_transactional_emails_active(): bool
{ {
return data_get(InstanceSettings::get(), 'smtp_enabled'); return data_get(InstanceSettings::get(), 'smtp_enabled');
} }
function set_transanctional_email_settings() function set_transanctional_email_settings(): void
{ {
$settings = InstanceSettings::get(); $settings = InstanceSettings::get();
$password = data_get($settings, 'smtp_password'); $password = data_get($settings, 'smtp_password');
if ($password) $password = decrypt($password); if (isset($password)) {
$password = decrypt($password);
}
config()->set('mail.default', 'smtp'); config()->set('mail.default', 'smtp');
config()->set('mail.mailers.smtp', [ config()->set('mail.mailers.smtp', [
@ -105,16 +116,19 @@ function set_transanctional_email_settings()
]); ]);
} }
function base_ip() function base_ip(): string
{ {
if (isDev()) { if (is_dev()) {
return "http://localhost"; return "http://localhost";
} }
$settings = InstanceSettings::get(); $settings = InstanceSettings::get();
return "http://{$settings->public_ipv4}"; return "http://$settings->public_ipv4";
} }
function base_url(bool $withPort = true) /**
* If fqdn is set, return it, otherwise return public ip.
*/
function base_url(bool $withPort = true): string
{ {
$settings = InstanceSettings::get(); $settings = InstanceSettings::get();
if ($settings->fqdn) { if ($settings->fqdn) {
@ -123,31 +137,32 @@ function base_url(bool $withPort = true)
$port = config('app.port'); $port = config('app.port');
if ($settings->public_ipv4) { if ($settings->public_ipv4) {
if ($withPort) { if ($withPort) {
if (isDev()) { if (is_dev()) {
return "http://localhost:{$port}"; return "http://localhost:$port";
} }
return "http://{$settings->public_ipv4}:{$port}"; return "http://$settings->public_ipv4:$port";
} }
if (isDev()) { if (is_dev()) {
return "http://localhost"; return "http://localhost";
} }
return "http://{$settings->public_ipv4}"; return "http://$settings->public_ipv4";
} }
if ($settings->public_ipv6) { if ($settings->public_ipv6) {
if ($withPort) { if ($withPort) {
return "http://{$settings->public_ipv6}:{$port}"; return "http://$settings->public_ipv6:$port";
} }
return "http://{$settings->public_ipv6}"; return "http://$settings->public_ipv6";
} }
return url('/'); return url('/');
} }
function isDev() function is_dev(): bool
{ {
return config('app.env') === 'local'; return config('app.env') === 'local';
} }
function isCloud() function is_cloud(): bool
{ {
return !config('coolify.self_hosted'); return !config('coolify.self_hosted');
} }

View File

@ -0,0 +1,21 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::table('standalone_postgresqls', function (Blueprint $table) {
$table->text('postgres_password')->change();
});
}
public function down(): void
{
Schema::table('standalone_postgresqls', function (Blueprint $table) {
$table->string('postgres_password')->change();
});
}
};

View File

@ -55,7 +55,7 @@
@endif @endif
@if (data_get($application, 'ports_mappings_array')) @if (data_get($application, 'ports_mappings_array'))
@foreach ($application->ports_mappings_array as $port) @foreach ($application->ports_mappings_array as $port)
@if (isDev()) @if (is_dev())
<li> <li>
<a class="text-xs text-white rounded-none hover:no-underline hover:bg-coollabs hover:text-white" <a class="text-xs text-white rounded-none hover:no-underline hover:bg-coollabs hover:text-white"
target="_blank" href="http://localhost:{{ explode(':', $port)[0] }}"> target="_blank" href="http://localhost:{{ explode(':', $port)[0] }}">

View File

@ -10,7 +10,7 @@
href="{{ route('settings.emails') }}"> href="{{ route('settings.emails') }}">
<button>SMTP</button> <button>SMTP</button>
</a> </a>
@if (isCloud()) @if (is_cloud())
<a class="{{ request()->routeIs('settings.license') ? 'text-white' : '' }}" <a class="{{ request()->routeIs('settings.license') ? 'text-white' : '' }}"
href="{{ route('settings.license') }}"> href="{{ route('settings.license') }}">
<button>Resale License</button> <button>Resale License</button>

View File

@ -22,7 +22,7 @@
<div class="stat-value">{{ $s3s->count() }}</div> <div class="stat-value">{{ $s3s->count() }}</div>
</div> </div>
</div> </div>
@if (isDev()) @if (is_dev())
<livewire:dev.s3-test/> <livewire:dev.s3-test/>
<livewire:dev.scheduled-backups/> <livewire:dev.scheduled-backups/>
@endif @endif

View File

@ -23,7 +23,7 @@
@if (data_get($model, 'discord_enabled')) @if (data_get($model, 'discord_enabled'))
<h4 class="mt-4">Subscribe to events</h4> <h4 class="mt-4">Subscribe to events</h4>
<div class="w-64 "> <div class="w-64 ">
@if (isDev()) @if (is_dev())
<x-forms.checkbox instantSave="saveModel" id="model.discord_notifications_test" label="Test"/> <x-forms.checkbox instantSave="saveModel" id="model.discord_notifications_test" label="Test"/>
@endif @endif
<h5 class="mt-4">Applications</h5> <h5 class="mt-4">Applications</h5>

View File

@ -60,7 +60,7 @@
@if (data_get($model, 'smtp_enabled')) @if (data_get($model, 'smtp_enabled'))
<h4 class="mt-4">Subscribe to events</h4> <h4 class="mt-4">Subscribe to events</h4>
<div class="w-64"> <div class="w-64">
@if (isDev()) @if (is_dev())
<x-forms.checkbox instantSave="saveModel" id="model.smtp_notifications_test" label="Test"/> <x-forms.checkbox instantSave="saveModel" id="model.smtp_notifications_test" label="Test"/>
@endif @endif
<h5 class="mt-4">Applications</h5> <h5 class="mt-4">Applications</h5>

View File

@ -87,7 +87,7 @@
<div class="pb-4">This will remove this server from Coolify. Beware! There is no coming <div class="pb-4">This will remove this server from Coolify. Beware! There is no coming
back! back!
</div> </div>
@if ($server->id !== 0 || isDev()) @if ($server->id !== 0 || is_dev())
<x-forms.button isError isModal modalId="deleteServer"> <x-forms.button isError isModal modalId="deleteServer">
Delete Delete
</x-forms.button> </x-forms.button>

View File

@ -1,7 +1,7 @@
<x-layout> <x-layout>
<x-team.navbar :team="session('currentTeam')"/> <x-team.navbar :team="session('currentTeam')"/>
<livewire:team.form/> <livewire:team.form/>
@if (isCloud()) @if (is_cloud())
<div class="pb-8"> <div class="pb-8">
<h3>Subscription</h3> <h3>Subscription</h3>
@if (data_get(auth()->user()->currentTeam(), @if (data_get(auth()->user()->currentTeam(),

View File

@ -174,7 +174,7 @@ Route::post('/source/github/events', function () {
} }
}); });
if (isCloud()) { if (is_cloud()) {
Route::post('/payments/events', function () { Route::post('/payments/events', function () {
try { try {
$secret = config('coolify.lemon_squeezy_webhook_secret'); $secret = config('coolify.lemon_squeezy_webhook_secret');

View File

@ -1,7 +1,7 @@
{ {
"coolify": { "coolify": {
"main": { "main": {
"version": "3.12.33" "version": "3.12.36"
}, },
"v4": { "v4": {
"version": "4.0.0-beta.18" "version": "4.0.0-beta.18"