@@ -1 +1,4 @@
|
||||
import './bootstrap';
|
||||
// import './bootstrap';
|
||||
import Alpine from 'alpinejs'
|
||||
window.Alpine = Alpine
|
||||
Alpine.start()
|
||||
|
||||
7
resources/views/components/applications/layout.blade.php
Normal file
7
resources/views/components/applications/layout.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<x-layout>
|
||||
<h1>{{ $title ?? 'NOT SET' }}</h1>
|
||||
<x-applications.navbar :applicationId="$applicationId" />
|
||||
<div>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</x-layout>
|
||||
5
resources/views/components/applications/navbar.blade.php
Normal file
5
resources/views/components/applications/navbar.blade.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<nav class="flex gap-4 py-2 bg-gray-100">
|
||||
<a href="{{ route('project.applications.configuration', Route::current()->parameters()) }}">Configuration</a>
|
||||
<a href="{{ route('project.applications.deployments', Route::current()->parameters()) }}">Deployments</a>
|
||||
<livewire:deploy-application :applicationId="$applicationId" />
|
||||
</nav>
|
||||
33
resources/views/components/input.blade.php
Normal file
33
resources/views/components/input.blade.php
Normal file
@@ -0,0 +1,33 @@
|
||||
@if ($type === 'checkbox')
|
||||
<label for={{ $name }}>
|
||||
@if ($label)
|
||||
{{ $label }}
|
||||
@else
|
||||
{{ $name }}
|
||||
@endif
|
||||
@if ($required)
|
||||
*
|
||||
@endif
|
||||
<input type="checkbox" id={{ $name }}
|
||||
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $name }} @else wire:model.defer={{ $name }} @endif
|
||||
name={{ $name }}>
|
||||
</label>
|
||||
@else
|
||||
<label for={{ $name }}>
|
||||
@if ($label)
|
||||
{{ $label }}
|
||||
@else
|
||||
{{ $name }}
|
||||
@endif
|
||||
@if ($required)
|
||||
*
|
||||
@endif
|
||||
</label>
|
||||
<input type="text" id={{ $name }} wire:model.defer={{ $name }} name={{ $name }}
|
||||
@if ($required) required @endif
|
||||
@if ($readonly) readOnly=true disabled=true @endif />
|
||||
@endif
|
||||
|
||||
@error($name)
|
||||
<span class="text-red-500">{{ $message }}</span>
|
||||
@enderror
|
||||
@@ -7,6 +7,7 @@
|
||||
<title>{{ $title ?? 'Coolify' }}</title>
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
@vite(['resources/js/app.js', 'resources/css/app.css'])
|
||||
<style>[x-cloak] { display: none !important; }</style>
|
||||
@livewireStyles
|
||||
</head>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<nav>
|
||||
<nav class="flex gap-2 ">
|
||||
<div>v{{ config('coolify.version') }}</div>
|
||||
@guest
|
||||
<a href="/login">Login</a>
|
||||
@@ -14,6 +14,6 @@
|
||||
@csrf
|
||||
<button type="submit">Logout</button>
|
||||
</form>
|
||||
<livewire:check-update>
|
||||
{{-- <livewire:check-update> --}}
|
||||
@endauth
|
||||
</nav>
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<div>
|
||||
<form class="flex flex-col">
|
||||
<label>Name</label>
|
||||
<input wire:model="name" type="text" name="name" />
|
||||
<label>Fqdn</label>
|
||||
<input wire:model="fqdn" type="text" name="fqdn" />
|
||||
<label>Repository</label>
|
||||
<input wire:model="git_repository" type="text" name="git_repository" />
|
||||
<label>Branch</label>
|
||||
<input wire:model="git_branch" type="text" name="git_branch" />
|
||||
<label>Commit SHA</label>
|
||||
<input wire:model="git_commit_sha" type="text" name="git_commit_sha" />
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
<div>
|
||||
<p>IP: {{ $destination->server->ip }}</p>
|
||||
<p>Description: {{ $destination->server->description }}</p>
|
||||
<p>Docker Network: {{ $destination->network }}</p>
|
||||
</div>
|
||||
@@ -0,0 +1,7 @@
|
||||
<div>
|
||||
@forelse ($envs as $env)
|
||||
{{ dump($env) }}
|
||||
@empty
|
||||
<p>There are no environment variables for this application.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
37
resources/views/livewire/application/general.blade.php
Normal file
37
resources/views/livewire/application/general.blade.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<div>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col">
|
||||
<div class="flex flex-col xl:flex-row gap-2">
|
||||
<div class="flex-col flex w-96">
|
||||
<x-input name="application.name" label="Name" required />
|
||||
<x-input name="application.fqdn" label="FQDN" />
|
||||
</div>
|
||||
<div class="flex-col flex w-96">
|
||||
<x-input name="application.install_command" label="Install Command" />
|
||||
<x-input name="application.build_command" label="Build Command" />
|
||||
<x-input name="application.start_command" label="Start Command" />
|
||||
<x-input name="application.build_pack" label="Build Pack" />
|
||||
</div>
|
||||
<div class="flex-col flex w-96">
|
||||
<x-input name="application.base_directory" label="Base Directory" />
|
||||
<x-input name="application.publish_directory" label="Publish Directory" />
|
||||
</div>
|
||||
<div class="flex-col flex w-96">
|
||||
<x-input name="application.ports_exposes" label="Ports Exposes" />
|
||||
</div>
|
||||
</div>
|
||||
<button class="flex mx-auto mt-4" type="submit">
|
||||
Submit
|
||||
</button>
|
||||
</form>
|
||||
<div class="flex flex-col pt-4 w-52 text-right">
|
||||
<x-input instantSave type="checkbox" name="is_auto_deploy" label="Auto Deploy?" />
|
||||
<x-input instantSave type="checkbox" name="is_dual_cert" label="Dual Certs?" />
|
||||
<x-input instantSave type="checkbox" name="is_previews" label="Previews?" />
|
||||
<x-input instantSave type="checkbox" name="is_bot" label="Is Bot?" />
|
||||
<x-input instantSave type="checkbox" name="is_custom_ssl" label="Is Custom SSL?" />
|
||||
<x-input instantSave type="checkbox" name="is_http2" label="Is Http2?" />
|
||||
<x-input instantSave type="checkbox" name="is_git_submodules_allowed" label="Git Submodules Allowed?" />
|
||||
<x-input instantSave type="checkbox" name="is_git_lfs_allowed" label="Git LFS Allowed?" />
|
||||
<x-input instantSave type="checkbox" name="is_debug" label="Debug" />
|
||||
</div>
|
||||
</div>
|
||||
9
resources/views/livewire/application/source.blade.php
Normal file
9
resources/views/livewire/application/source.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<div>
|
||||
<p>Source Name: {{ data_get($application,'source.name') }}</p>
|
||||
<p>Is Public Source: {{ data_get($application,'source.is_public') }}</p>
|
||||
<div class="flex-col flex w-96">
|
||||
<x-input name="application.git_repository" label="Git Repository" readonly />
|
||||
<x-input name="application.git_branch" label="Git Branch" readonly />
|
||||
<x-input name="application.git_commit_sha" label="Git Commit SHA" readonly />
|
||||
</div>
|
||||
</div>
|
||||
10
resources/views/livewire/application/storages.blade.php
Normal file
10
resources/views/livewire/application/storages.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<div>
|
||||
@forelse ($storages as $storage)
|
||||
<p>Name:{{ data_get($storage, 'name') }}</p>
|
||||
<p>MountPath:{{ data_get($storage, 'mount_path') }}</p>
|
||||
<p>HostPath:{{ data_get($storage, 'host_path') }}</p>
|
||||
<p>ContainerId:{{ data_get($storage, 'container_id') }}</p>
|
||||
@empty
|
||||
<p>No storage found.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
@@ -1,9 +1,34 @@
|
||||
<div>
|
||||
@if ($application->status === 'running')
|
||||
<button wire:click='start'>Restart</button>
|
||||
<button wire:click='forceRebuild'>Force Rebuild</button>
|
||||
<button wire:click='stop'>Stop</button>
|
||||
@else
|
||||
<button wire:click='start'>Start</button>
|
||||
<button wire:click='forceRebuild'>Start (no cache)</button>
|
||||
@endif
|
||||
<button wire:click='kill'>Kill</button>
|
||||
<span wire:poll='pollingStatus'>status: {{ $application->status }}</span>
|
||||
<span wire:poll='pollingStatus'>
|
||||
@if ($application->status === 'running')
|
||||
<span class="text-green-500">{{ $application->status }}</span>
|
||||
@if (!data_get($application, 'settings.is_bot') && data_get($application, 'fqdn'))
|
||||
<a target="_blank" href="{{ data_get($application, 'fqdn') }}">Open URL</a>
|
||||
@endif
|
||||
|
||||
@if (data_get($application, 'ports_exposes_array'))
|
||||
@foreach ($application->ports_exposes_array as $port)
|
||||
@if (env('APP_ENV') === 'local')
|
||||
<a target="_blank" href="http://localhost:{{ $port }}">Open
|
||||
{{ $port }}</a>
|
||||
@else
|
||||
<a target="_blank"
|
||||
href="http://{{ $application->destination->server->ip }}:{{ $port }}">Open
|
||||
{{ $port }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@else
|
||||
<span class="text-red-500">{{ $application->status }}</span>
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
|
||||
6
resources/views/livewire/poll-deployment.blade.php
Normal file
6
resources/views/livewire/poll-deployment.blade.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<div>
|
||||
<a @if ($status === 'in_progress' || $status === 'holding') wire:poll='polling' @endif href="{{ url()->current() }}/{{ $deployment_uuid }}">
|
||||
{{ $created_at }}
|
||||
{{ $deployment_uuid }}</a>
|
||||
{{ $status }}
|
||||
</div>
|
||||
@@ -1,15 +0,0 @@
|
||||
<x-layout>
|
||||
<h1>Application</h1>
|
||||
<livewire:deploy-application :applicationId="$application->id" />
|
||||
<livewire:application-form :applicationId="$application->id" />
|
||||
<div>
|
||||
<h2>Deployments</h2>
|
||||
@foreach ($deployments as $deployment)
|
||||
<p>
|
||||
<a href="{{ url()->current() }}/deployment/{{ data_get($deployment->properties, 'deployment_uuid') }}">
|
||||
{{ data_get($deployment->properties, 'deployment_uuid') }}</a>
|
||||
{{ data_get($deployment->properties, 'status') }}
|
||||
</p>
|
||||
@endforeach
|
||||
</div>
|
||||
</x-layout>
|
||||
28
resources/views/project/applications/configuration.blade.php
Normal file
28
resources/views/project/applications/configuration.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<x-applications.layout :applicationId="$application->id" title="Configurations">
|
||||
<div x-data="{ tab: window.location.hash ? window.location.hash.substring(1) : 'general' }">
|
||||
<div class="flex gap-4">
|
||||
<a @click.prevent="tab = 'general'; window.location.hash = 'general'" href="#">General</a>
|
||||
<a @click.prevent="tab = 'envs'; window.location.hash = 'envs'" href="#">Environment Variables</a>
|
||||
<a @click.prevent="tab = 'source'; window.location.hash = 'source'" href="#">Source</a>
|
||||
<a @click.prevent="tab = 'destination'; window.location.hash = 'destination'" href="#">Destination
|
||||
</a>
|
||||
<a @click.prevent="tab = 'storages'; window.location.hash = 'storages'" href="#">Storage
|
||||
</a>
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'general'">
|
||||
<livewire:application.general :applicationId="$application->id" />
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'envs'">
|
||||
<livewire:application.environment-variables />
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'source'">
|
||||
<livewire:application.source :applicationId="$application->id" />
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'destination'">
|
||||
<livewire:application.destination :destination="$application->destination" />
|
||||
</div>
|
||||
<div x-cloak x-show="tab === 'storages'">
|
||||
<livewire:application.storages :storages="$application->persistentStorages" />
|
||||
</div>
|
||||
</div>
|
||||
</x-applications.layout>
|
||||
@@ -0,0 +1,3 @@
|
||||
<x-applications.layout :applicationId="$application->id" title="Deployment">
|
||||
<livewire:poll-activity :activity="$activity" :deployment_uuid="$deployment_uuid" />
|
||||
</x-applications.layout>
|
||||
10
resources/views/project/applications/deployments.blade.php
Normal file
10
resources/views/project/applications/deployments.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<x-applications.layout :applicationId="$application->id" title="Deployments">
|
||||
<div class="pt-2">
|
||||
@forelse ($deployments as $deployment)
|
||||
<livewire:poll-deployment :deployment_uuid="data_get($deployment->properties, 'deployment_uuid')" :created_at="data_get($deployment, 'created_at')" :status="data_get($deployment->properties, 'status')" />
|
||||
|
||||
@empty
|
||||
<p>No deployments found.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</x-applications.layout>
|
||||
@@ -1,4 +0,0 @@
|
||||
<x-layout>
|
||||
<h1>Deployment</h1>
|
||||
<livewire:poll-activity :activity="$activity" :deployment_uuid="$deployment_uuid" />
|
||||
</x-layout>
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
@foreach ($environment->applications as $application)
|
||||
<p>
|
||||
<a href="{{ route('project.application', [$project->uuid, $environment->name, $application->uuid]) }}">
|
||||
<a href="{{ route('project.applications.configuration', [$project->uuid, $environment->name, $application->uuid]) }}">
|
||||
{{ $application->name }}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user