wip: services
feat: able to map port<->domain
This commit is contained in:
@@ -12,6 +12,20 @@
|
||||
<x-forms.input id="application.name" label="Name" required />
|
||||
<x-forms.input id="application.description" label="Description" />
|
||||
</div>
|
||||
<div class="flex items-end gap-2">
|
||||
<x-forms.input placeholder="https://coolify.io" id="application.fqdn" label="Domains"
|
||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. " />
|
||||
@if ($wildcard_domain)
|
||||
@if ($global_wildcard_domain)
|
||||
<x-forms.button wire:click="generateGlobalRandomDomain">Set Global Wildcard
|
||||
</x-forms.button>
|
||||
@endif
|
||||
@if ($server_wildcard_domain)
|
||||
<x-forms.button wire:click="generateServerRandomDomain">Set Server Wildcard
|
||||
</x-forms.button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
@if ($application->settings->is_static)
|
||||
<x-forms.select id="application.static_image" label="Static Image" required>
|
||||
<option value="nginx:alpine">nginx:alpine</option>
|
||||
@@ -46,7 +60,7 @@
|
||||
<x-forms.input id="application.ports_exposes" label="Ports Exposes" readonly />
|
||||
@else
|
||||
<x-forms.input placeholder="3000,3001" id="application.ports_exposes" label="Ports Exposes" required
|
||||
helper="A comma separated list of ports you would like to expose for the proxy." />
|
||||
helper="A comma separated list of ports your application uses. The first port will be used as default healthcheck endpoint. Be sure to set this correctly." />
|
||||
@endif
|
||||
<x-forms.input placeholder="3000:3000" id="application.ports_mappings" label="Ports Mappings"
|
||||
helper="A comma separated list of ports you would like to map to the host system. Useful when you do not want to use domains.<br><span class='inline-block font-bold text-warning'>Example</span>3000:3000,3002:3002" />
|
||||
|
||||
@@ -6,8 +6,15 @@
|
||||
<h2>Docker Compose</h2>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
</div>
|
||||
<x-services.explanation />
|
||||
<x-forms.textarea rows="20" id="dockercompose"
|
||||
<x-forms.textarea label="Docker Compose file"
|
||||
helper="
|
||||
You can use these variables in your Docker Compose file and Coolify will generate default values or replace them with the values you set on the UI forms.<br>
|
||||
<br>
|
||||
- SERVICE_FQDN_*: FQDN - could be changable from the UI. (example: SERVICE_FQDN_GHOST)<br>
|
||||
- SERVICE_URL_*: URL parsed from FQDN - could be changable from the UI. (example: SERVICE_URL_GHOST)<br>
|
||||
- SERVICE_USER_*: Generated user, not encrypted in database (example: SERVICE_USER_MYSQL)<br>
|
||||
- SERVICE_PASSWORD_*: Generated password, encrypted in database (example: SERVICE_PASSWORD_MYSQL)<br>"
|
||||
rows="20" id="dockercompose"
|
||||
placeholder='services:
|
||||
ghost:
|
||||
documentation: https://ghost.org/docs/config
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
<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>
|
||||
@if (isset($application->fqdn))
|
||||
<x-forms.input label="FQDN" required id="application.fqdn"></x-forms.input>
|
||||
@endisset
|
||||
</div>
|
||||
<x-forms.input label="Name" id="application.human_name" placeholder="Human readable name"></x-forms.input>
|
||||
<x-forms.input label="Description" id="application.description"></x-forms.input>
|
||||
<x-forms.input placeholder="https://app.coolify.io" label="Domains" required
|
||||
id="application.fqdn"></x-forms.input>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -10,5 +10,6 @@
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input label="Name" id="database.human_name" placeholder="Name"></x-forms.input>
|
||||
<x-forms.input label="Description" id="database.description"></x-forms.input>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -2,11 +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 === '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 === 'compose' && 'text-white'"
|
||||
@click.prevent="activeTab = 'compose'; window.location.hash = 'compose'" href="#">Compose File</a>
|
||||
<a :class="activeTab === 'environment-variables' && 'text-white'"
|
||||
@click.prevent="activeTab = 'environment-variables'; window.location.hash = 'environment-variables'"
|
||||
href="#">Environment
|
||||
@@ -17,6 +17,17 @@
|
||||
</div>
|
||||
<div class="w-full pl-8">
|
||||
<div x-cloak x-show="activeTab === 'service-stack'">
|
||||
<form wire:submit.prevent='submit' class="pb-4">
|
||||
<div class="flex gap-2">
|
||||
<h2 class="pb-4">Configuration </h2>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input id="service.name" required label="Service Name"
|
||||
placeholder="My super wordpress site" />
|
||||
<x-forms.input id="service.description" label="Description" />
|
||||
</div>
|
||||
</form>
|
||||
<h2 class="pb-4"> Service Stack </h2>
|
||||
<div class="grid grid-cols-1 gap-2">
|
||||
@foreach ($service->applications as $application)
|
||||
@@ -27,19 +38,25 @@
|
||||
@else
|
||||
{{ Str::headline($application->name) }}
|
||||
@endif
|
||||
@if ($application->description)
|
||||
<span class="text-xs">{{ $application->description }}</span>
|
||||
@endif
|
||||
@if ($application->fqdn)
|
||||
<span class="text-xs">{{ $application->fqdn }}</span>
|
||||
@endif
|
||||
</a>
|
||||
@endforeach
|
||||
@foreach ($service->databases as $database)
|
||||
<a class="justify-center box"
|
||||
<a class="flex flex-col justify-center box"
|
||||
href="{{ route('project.service.show', [...$parameters, 'service_name' => $database->name]) }}">
|
||||
@if ($database->human_name)
|
||||
{{ Str::headline($database->human_name) }}
|
||||
@else
|
||||
{{ Str::headline($database->name) }}
|
||||
@endif
|
||||
@if ($database->description)
|
||||
<span class="text-xs">{{ $database->description }}</span>
|
||||
@endif
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -58,15 +75,21 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<x-services.explanation />
|
||||
|
||||
<div x-cloak x-show="raw">
|
||||
<x-forms.textarea rows="20" id="service.docker_compose_raw">
|
||||
<x-forms.textarea label="Docker Compose file"
|
||||
helper="
|
||||
You can use these variables in your Docker Compose file and Coolify will generate default values or replace them with the values you set on the UI forms.<br>
|
||||
<br>
|
||||
- SERVICE_FQDN_*: FQDN - could be changable from the UI. (example: SERVICE_FQDN_GHOST)<br>
|
||||
- SERVICE_URL_*: URL parsed from FQDN - could be changable from the UI. (example: SERVICE_URL_GHOST)<br>
|
||||
- SERVICE_USER_*: Generated user, not encrypted in database (example: SERVICE_USER_MYSQL)<br>
|
||||
- SERVICE_PASSWORD_*: Generated password, encrypted in database (example: SERVICE_PASSWORD_MYSQL)<br>"
|
||||
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 label="Actual Docker Compose file that will be deployed" readonly rows="20" id="service.docker_compose">
|
||||
</x-forms.textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
<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="{{ request()->routeIs('project.service') ? 'text-white' : '' }}"
|
||||
href="{{ route('project.service', [...$parameters, 'service_name' => null]) }}">
|
||||
<button><- Back</button>
|
||||
</a>
|
||||
<a :class="activeTab === 'general' && 'text-white'"
|
||||
@click.prevent="activeTab = 'general'; window.location.hash = 'general'" href="#">General</a>
|
||||
<a :class="activeTab === 'storages' && 'text-white'"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<div>
|
||||
<h2>Destination</h2>
|
||||
<div class="">The destination server / network where your application will be deployed to.</div>
|
||||
<h2>Server</h2>
|
||||
<div class="">The destination server where your application will be deployed to.</div>
|
||||
<div class="py-4 ">
|
||||
<p>Server: {{ data_get($destination, 'server.name') }}</p>
|
||||
<p>Destination Network: {{ data_get($destination, 'server.network') }}</p>
|
||||
<a class="box"
|
||||
href="{{ route('server.show', ['server_uuid' => data_get($destination, 'server.uuid')]) }}">On server <span class="px-1 text-warning">{{ data_get($destination, 'server.name') }}</span>
|
||||
in <span class="px-1 text-warning"> {{ data_get($destination, 'network') }} </span> network.</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user