wip: services

This commit is contained in:
Andras Bacsai
2023-09-22 12:08:51 +02:00
parent 9c2fea4b2e
commit c91f426af3
16 changed files with 103 additions and 242 deletions

View File

@@ -4,22 +4,13 @@
<form wire:submit.prevent="submit">
<div class="flex gap-2 pb-1">
<h2>Docker Compose</h2>
<x-forms.button type="submit">Save</x-forms.button>
</div>
<pre>
# Application generated variables
# You can use these variables in your docker-compose.yml file and Coolify will create default values or replace them with the values you set in the application creation form.
# SERVICE_FQDN_*: FQDN coming from your application (https://coolify.io)
# SERVICE_URL_*: URL coming from your application (coolify.io)
# SERVICE_USER_*: Generated by your application, username (not encrypted)
# SERVICE_PASSWORD_*: Generated by your application, password (encrypted)
</pre>
<x-services.explanation />
<x-forms.textarea rows="20" id="dockercompose"
placeholder='services:
ghost:
documentation: https://docs.ghost.org/docs/config
documentation: https://ghost.org/docs/config
image: ghost:5
volumes:
- ghost-content-data:/var/lib/ghost/content

View File

@@ -4,7 +4,7 @@
<div class="flex flex-col gap-2 pt-10">
@if ($current_step === 'type')
<ul class="pb-10 steps">
<li class="step step-secondary">Select Source Type</li>
<li class="step step-secondary">Select Resource Type</li>
<li class="step">Select a Server</li>
<li class="step">Select a Destination</li>
</ul>
@@ -95,7 +95,7 @@
@endif
@if ($current_step === 'servers')
<ul class="pb-10 steps">
<li class="step step-secondary">Select Source Type</li>
<li class="step step-secondary">Select Resource Type</li>
<li class="step step-secondary">Select a Server</li>
<li class="step">Select a Destination</li>
</ul>
@@ -123,7 +123,7 @@
@endif
@if ($current_step === 'destinations')
<ul class="pb-10 steps">
<li class="step step-secondary">Select Source Type</li>
<li class="step step-secondary">Select Resource Type</li>
<li class="step step-secondary">Select a Server</li>
<li class="step step-secondary">Select a Destination</li>
</ul>

View File

@@ -1,14 +1,17 @@
<form wire:submit.prevent='submit'>
<div class="flex gap-2 pb-4">
<div class="flex items-center gap-2 pb-4">
@if ($application->human_name)
<h2>{{ Str::headline($application->human_name) }}</h2>
@else
<h2>{{ Str::headline($application->name) }}</h2>
@endif
<x-forms.button type="submit">Save</x-forms.button>
<a target="_blank" href="{{ $application->documentation() }}">Documentation <x-external-link /></a>
</div>
<div class="flex gap-2">
<x-forms.input label="Name" id="application.human_name" placeholder="Name"></x-forms.input>
<x-forms.input label="FQDN" required id="application.fqdn"></x-forms.input>
</div>
@if (isset($application->fqdn))
<x-forms.input label="FQDN" required id="application.fqdn"></x-forms.input>
@endisset
</div>
</form>

View File

@@ -1,11 +1,12 @@
<form wire:submit.prevent='submit'>
<div class="flex gap-2 pb-4">
<div class="flex items-center gap-2 pb-4">
@if ($database->human_name)
<h2>{{ Str::headline($database->human_name) }}</h2>
@else
<h2>{{ Str::headline($database->name) }}</h2>
@endif
<x-forms.button type="submit">Save</x-forms.button>
<a target="_blank" href="{{ $database->documentation() }}">Documentation <x-external-link /></a>
</div>
<div class="flex gap-2">
<x-forms.input label="Name" id="database.human_name" placeholder="Name"></x-forms.input>

View File

@@ -2,10 +2,11 @@
<livewire:project.service.navbar :service="$service" :parameters="$parameters" :query="$query" />
<div class="flex h-full pt-6">
<div class="flex flex-col gap-4 min-w-fit">
<a :class="activeTab === 'service-stack' && 'text-white'"
@click.prevent="activeTab = 'service-stack'; window.location.hash = 'service-stack'" href="#">Service Stack</a>
<a :class="activeTab === 'compose' && 'text-white'"
<a :class="activeTab === 'compose' && 'text-white'"
@click.prevent="activeTab = 'compose'; window.location.hash = 'compose'" href="#">Compose File</a>
<a :class="activeTab === 'service-stack' && 'text-white'"
@click.prevent="activeTab = 'service-stack'; window.location.hash = 'service-stack'"
href="#">Service Stack</a>
<a :class="activeTab === 'environment-variables' && 'text-white'"
@click.prevent="activeTab = 'environment-variables'; window.location.hash = 'environment-variables'"
href="#">Environment
@@ -57,11 +58,14 @@
</div>
</div>
<x-services.explanation />
<div x-cloak x-show="raw">
<x-forms.textarea rows="20" id="service.docker_compose_raw">
</x-forms.textarea>
</div>
<div x-cloak x-show="raw === false">
<x-forms.textarea readonly rows="20" id="service.docker_compose">
</x-forms.textarea>
</div>

View File

@@ -7,21 +7,14 @@
</x-slot:modalBody>
</x-modal>
@if ($isReadOnly)
<span class="text-warning">Please modify storage layout in your Compose file.</span>
<span class="text-warning">Please modify storage layout in your <a
class="underline" href="{{ Str::of(url()->current())->beforeLast('/') }}#compose">Docker Compose</a> file.</span>
@endif
<form wire:submit.prevent='submit' class="flex flex-col gap-2 pt-4 xl:items-end xl:flex-row">
@if ($isReadOnly)
<x-forms.input id="storage.name" label="Name" required readonly />
<x-forms.input id="storage.host_path" label="Source Path" readonly />
<x-forms.input id="storage.mount_path" label="Destination Path" required readonly />
<div class="flex gap-2">
<x-forms.button type="submit" disabled>
Update
</x-forms.button>
<x-forms.button isError isModal modalId="{{ $modalId }}">
Delete
</x-forms.button>
</div>
@else
<x-forms.input id="storage.name" label="Name" required />
<x-forms.input id="storage.host_path" label="Source Path" />