Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

6.7 KB
Raw Blame
                <form wire:submit.prevent="submit" class="application-settings-form flex flex-col gap-6">
                    <x-unsaved-bar action="submit" />
                    <x-application.settings-section id="server-overview-section" title="Server overview"
                        helper="Operating system and hardware details for the server running this Coolify instance.">
                        <x-slot:actions>
                            <x-forms.button type="button" wire:click="refreshServerMetadata"
                                :disabled="! $server->isFunctional()"
                                :tooltip="$server->isFunctional() ? null : 'Validate the connection first.'">
                                <x-reicon name="refresh" class="size-3.5" />
                                {{ $server->server_metadata ? 'Refresh details' : 'Fetch server details' }}
                            </x-forms.button>
                            <x-forms.button type="button" wire:click.prevent="checkLocalhostConnection"
                                :isHighlighted="! $server->isFunctional()" canGate="update" :canResource="$server">
                                <x-reicon :name="$server->isFunctional() ? 'refresh' : 'alert-circle'" class="size-3.5" />
                                {{ $server->isFunctional() ? 'Revalidate connection' : 'Validate connection' }}
                            </x-forms.button>
                        </x-slot:actions>

                        @if ($this->limaStartCommand)
                            <x-callout type="info" title="Start this Lima VM locally" class="mb-4">
                                <code
                                    class="mt-2 block overflow-x-auto rounded-lg bg-neutral-950 px-3 py-2 font-mono text-[11px] text-neutral-200">{{ $this->limaStartCommand }}</code>
                            </x-callout>
                        @endif

                        <div class="flex items-start gap-3">
                            <div
                                class="flex size-9 shrink-0 items-center justify-center rounded-lg bg-neutral-100 text-neutral-600 dark:bg-white/[0.06] dark:text-fg-dim">
                                <x-reicon name="servers" class="size-4.5" />
                            </div>
                            <div>
                                <p class="text-sm font-medium text-neutral-950 dark:text-fg">Localhost</p>
                                <p class="mt-1 text-xs leading-5 text-neutral-500 dark:text-fg-dim">
                                    @if ($server->isFunctional())
                                        The server is reachable, validated, and ready to host resources.
                                    @else
                                        Validate the local Docker connection before using this server.
                                    @endif
                                </p>
                            </div>
                        </div>

                        @if ($server->server_metadata)
                            @include('livewire.server.partials.server-details', ['server' => $server])
                        @endif
                    </x-application.settings-section>

                    @if ($server->validation_logs)
                        <x-application.settings-section title="Previous validation output"
                            helper="The latest output produced while checking this server.">
                            <div
                                class="max-h-72 overflow-auto rounded-lg bg-neutral-950 p-4 font-mono text-xs leading-5 text-neutral-300">
                                {!! $server->validation_logs !!}
                            </div>
                        </x-application.settings-section>
                    @endif

                    <x-application.settings-section id="server-connection-section" title="Connection"
                        helper="Configure how Coolify identifies and connects to this server.">
                        <div class="grid gap-4 sm:grid-cols-2">
                            <x-forms.input canGate="update" :canResource="$server" id="name" label="Name"
                                required :disabled="$isValidating" />
                            <x-forms.input canGate="update" :canResource="$server" id="description"
                                label="Description" :disabled="$isValidating" />
                        </div>

                        <div class="mt-4 grid gap-4 lg:grid-cols-3">
                            <x-forms.input canGate="update" :canResource="$server" type="password" id="ip"
                                label="IP address or domain"
                                helper="Enter a hostname or IP address without http:// or https://."
                                required :disabled="$isValidating" />
                            <x-forms.input canGate="update" :canResource="$server" id="user" label="SSH user"
                                required :disabled="$isValidating" />
                            <x-forms.input canGate="update" :canResource="$server" type="number" id="port"
                                label="SSH port" required :disabled="$isValidating" />
                        </div>

                        <div class="mt-4 grid gap-4 lg:grid-cols-3">
                            <x-forms.input canGate="update" :canResource="$server" type="number"
                                id="connectionTimeout" label="Connection timeout"
                                helper="Seconds to wait before an SSH connection fails." min="1" max="300"
                                required :disabled="$isValidating" />
                            <x-forms.listbox searchable id="serverTimezone" label="Server timezone"
                                helper="Used for backup schedules, cron jobs, and displayed timestamps."
                                searchPlaceholder="Search timezones" searchEmptyText="No matching timezone"
                                :options="collect($this->timezones)->map(fn ($timezone) => [
                                    'value' => $timezone,
                                    'label' => $timezone,
                                ])->all()" :disabled="$isValidating" canGate="update" :canResource="$server" />
                            <x-forms.input canGate="update" :canResource="$server"
                                placeholder="https://example.com" id="wildcardDomain" label="Wildcard domain"
                                helper="New resources can receive generated subdomains from this domain."
                                :disabled="$isValidating" />
                        </div>
                    </x-application.settings-section>
                </form>