This commit is contained in:
Andras Bacsai 2023-06-14 12:48:29 +02:00
parent 8f0cd69cd3
commit 4698ab9722
24 changed files with 49 additions and 41 deletions

View File

@ -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 @@ public function submit()
$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());
}
}
}

View File

@ -303,12 +303,17 @@ private function next(string $status)
]);
$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)

View File

@ -29,7 +29,6 @@ public function handle()
{
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) {

View File

@ -22,6 +22,7 @@ public function run(): void
$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",

View File

@ -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();

View File

@ -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',

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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"] {

View File

@ -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">

View File

@ -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

View File

@ -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 @@ class="{{ request()->is('settings*') ? 'text-warning icon' : 'icon' }}" viewBox=
<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">

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -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 @@ class="text-xs text-white rounded-none hover:no-underline hover:bg-coollabs"
</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"

View File

@ -13,7 +13,6 @@
</tr>
</thead>
<tbody x-data>
@foreach ($invitations as $invite)
<tr>
<td>{{ $invite->email }}</td>

View File

@ -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>

View File

@ -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]) }}">

View File

@ -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 }}

View File

@ -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>

View File

@ -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')]) }}">

View File

@ -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"