coolify/resources/views/livewire/project/service/configuration.blade.php

197 lines
14 KiB
PHP
Raw Normal View History

2024-12-17 10:13:13 +00:00
<div>
2024-06-07 09:01:10 +00:00
<x-slot:title>
{{ data_get_str($service, 'name')->limit(10) }} > Configuration | Coolify
</x-slot>
2024-01-07 15:23:41 +00:00
<livewire:project.service.navbar :service="$service" :parameters="$parameters" :query="$query" />
2024-12-17 10:13:13 +00:00
<div class="flex flex-col h-full gap-8 pt-6 sm:flex-row">
<div class="flex flex-col items-start gap-2 min-w-fit">
<a class="menu-item sm:min-w-fit" target="_blank" href="{{ $service->documentation() }}">Documentation
<x-external-link /></a>
2024-12-17 10:13:13 +00:00
<a class='menu-item' wire:current.exact="menu-item-active"
href="{{ route('project.service.configuration', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}">General</a>
2024-12-17 10:13:13 +00:00
<a class='menu-item' wire:current.exact="menu-item-active"
href="{{ route('project.service.environment-variables', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}">Environment
Variables</a>
2024-12-17 10:13:13 +00:00
<a class='menu-item' wire:current.exact="menu-item-active"
href="{{ route('project.service.storages', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}">Persistent
Storages</a>
2024-12-17 10:13:13 +00:00
<a class='menu-item' wire:current.exact="menu-item-active"
href="{{ route('project.service.scheduled-tasks.show', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}">Scheduled
Tasks</a>
2024-12-17 10:13:13 +00:00
<a class='menu-item' wire:current.exact="menu-item-active"
href="{{ route('project.service.webhooks', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}">Webhooks</a>
2024-12-17 10:13:13 +00:00
<a class='menu-item' wire:current.exact="menu-item-active"
href="{{ route('project.service.resource-operations', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}">Resource
Operations</a>
2024-12-17 10:13:13 +00:00
<a class='menu-item' wire:current.exact="menu-item-active"
href="{{ route('project.service.tags', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}">Tags</a>
2024-12-17 10:13:13 +00:00
<a class='menu-item' wire:current.exact="menu-item-active"
href="{{ route('project.service.danger', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}">Danger
Zone</a>
2024-01-07 15:23:41 +00:00
</div>
<div class="w-full">
@if ($currentRoute === 'project.service.configuration')
2024-01-07 15:23:41 +00:00
<livewire:project.service.stack-form :service="$service" />
<h3>Services</h3>
<div class="grid grid-cols-1 gap-2 pt-4 xl:grid-cols-1" wire:poll.10000ms="check_status">
2024-01-07 15:23:41 +00:00
@foreach ($applications as $application)
<div @class([
v4.0.0-beta.416 (#5729) * feat(README): add InterviewPal sponsorship link and corresponding SVG icon * chore(versions): update coolify version to 4.0.0-beta.413 and nightly version to 4.0.0-beta.414 in configuration files * fix(terminal): enhance WebSocket client verification with authorized IPs in terminal server * chore(versions): update realtime version to 1.0.8 in versions.json * chore(versions): update realtime version to 1.0.8 in versions.json * chore(docker): update soketi image version to 1.0.8 in production configuration files * chore(versions): update coolify version to 4.0.0-beta.414 and nightly version to 4.0.0-beta.415 in configuration files * fix(ApplicationDeploymentJob): ensure source is an object before checking GitHub app properties * fix(ui): Disable livewire navigate feature (causing spam of setInterval()) * fix(ui): Remove required attribute from image input in service application view * fix(ui): Change application image validation to be nullable in service application view * fix(Server): Correct proxy path formatting for Traefik proxy type * chore(versions): update coolify version to 4.0.0-beta.416 and nightly version to 4.0.0-beta.417 in configuration files; fix links in deployment view * feat(Service): Add functionality to convert between applications and databases in docker-compose based applications fix(ui): Fix service layout refresh on compose change * fix(service): graceful shutdown of old container (#5731) * refactor(Database): streamline container shutdown process and reduce timeout duration * fix(ServerCheck): enhance proxy container check to ensure it is running before proceeding * chore(seeder): update git branch from 'main' to 'v4.x' for multiple examples in ApplicationSeeder * fix(applications): include pull_request_id in deployment queue check to prevent duplicate deployments * refactor(core): streamline container stopping process and reduce timeout duration; update related methods for consistency * fix(database): update label for image input field to improve clarity * feat(migration): add 'is_migrated' and 'custom_type' columns to service_applications and service_databases tables * feat(backup): implement custom database type selection and enhance scheduled backups management * fix(ServerCheck): set default proxy status to 'exited' to handle missing container state * fix(database): reduce container stop timeout from 300 to 30 seconds for improved responsiveness * refactor(database): update DB facade usage for consistency across service files * Update app/Livewire/Project/Service/Database.php Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * refactor(database): enhance application conversion logic and add existence checks for databases and applications * refactor(actions): standardize method naming for network and configuration deletion across application and service classes * refactor(logdrain): consolidate log drain stopping logic to reduce redundancy * refactor(StandaloneMariadb): add type hint for destination method to improve code clarity * refactor(DeleteResourceJob): streamline resource deletion logic and improve conditional checks for database types * refactor(jobs): update middleware to prevent job release after expiration for CleanupInstanceStuffsJob, RestartProxyJob, and ServerCheckJob * fix(ui): system theming for charts (#5740) * chore(deps-dev): bump vite from 6.2.6 to 6.3.4 (#5743) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.6 to 6.3.4. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v6.3.4/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 6.3.4 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(dev): mount points?! * fix(dev): proxy mount point * fix(ui): allow adding scheduled backups for non-migrated databases * fix(DatabaseBackupJob): escape PostgreSQL password in backup command (#5759) * fix(ui): correct closing div tag in service index view * Revert "fix(dev): mount points?!" This reverts commit 365bf3cbf0e5aa21a2ccb12fe6ec333b93e404da. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jérémy <jeremy.derdaele@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Best Codes <106822363+The-Best-Codes@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: busybox <29630035+busybox11@users.noreply.github.com>
2025-05-05 07:04:09 +00:00
'border-l border-dashed border-red-500' => str(
2024-01-07 15:23:41 +00:00
$application->status)->contains(['exited']),
'border-l border-dashed border-success' => str(
2024-01-07 15:23:41 +00:00
$application->status)->contains(['running']),
'border-l border-dashed border-warning' => str(
2024-01-07 15:23:41 +00:00
$application->status)->contains(['starting']),
2024-04-11 13:42:37 +00:00
'flex gap-2 box-without-bg-without-border dark:bg-coolgray-100 bg-white dark:hover:text-neutral-300 group',
2024-01-07 15:23:41 +00:00
])>
<div class="flex flex-row w-full">
<div class="flex flex-col flex-1">
<div class="pb-2">
@if ($application->human_name)
{{ Str::headline($application->human_name) }}
@else
{{ Str::headline($application->name) }}
@endif
<span class="text-xs">({{ $application->image }})</span>
</div>
@if ($application->configuration_required)
<span class="text-xs text-error">(configuration required)</span>
@endif
@if ($application->description)
<span class="text-xs">{{ Str::limit($application->description, 60) }}</span>
@endif
@if ($application->fqdn)
2024-04-11 13:42:37 +00:00
<span class="flex gap-1 text-xs">{{ Str::limit($application->fqdn, 60) }}
<x-modal-input title="Edit Domains" :closeOutside="false">
2024-04-11 13:42:37 +00:00
<x-slot:content>
<span class="cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg"
class="w-4 h-4 dark:text-warning text-coollabs"
2024-04-11 13:42:37 +00:00
viewBox="0 0 24 24">
<g fill="none" stroke="currentColor"
stroke-linecap="round" stroke-linejoin="round"
stroke-width="2">
<path
d="m12 15l8.385-8.415a2.1 2.1 0 0 0-2.97-2.97L9 12v3h3zm4-10l3 3" />
<path d="M9 7.07A7 7 0 0 0 10 21a7 7 0 0 0 6.929-6" />
</g>
</svg>
</span>
</x-slot:content>
<livewire:project.service.edit-domain
applicationId="{{ $application->id }}"
wire:key="edit-domain-{{ $application->id }}" />
2024-04-11 13:42:37 +00:00
</x-modal-input>
</span>
2024-01-07 15:23:41 +00:00
@endif
<div class="pt-2 text-xs">{{ $application->status }}</div>
2024-01-07 15:23:41 +00:00
</div>
<div class="flex items-center px-4">
<a class="mx-4 text-xs font-bold hover:underline"
href="{{ route('project.service.index', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid, 'stack_service_uuid' => $application->uuid]) }}">
2024-03-25 10:33:38 +00:00
Settings
2024-01-07 15:23:41 +00:00
</a>
@if (str($application->status)->contains('running'))
<x-modal-confirmation title="Confirm Service Application Restart?"
buttonTitle="Restart"
submitAction="restartApplication({{ $application->id }})" :actions="[
'The selected service application will be unavailable during the restart.',
'If the service application is currently in use data could be lost.',
]"
:confirmWithText="false" :confirmWithPassword="false"
step2ButtonText="Restart Service Container" />
@endif
2024-01-07 15:23:41 +00:00
</div>
</div>
</div>
@endforeach
@foreach ($databases as $database)
<div @class([
'border-l border-dashed border-red-500' => str($database->status)->contains(
['exited']),
'border-l border-dashed border-success' => str($database->status)->contains(
['running']),
'border-l border-dashed border-warning' => str($database->status)->contains(
['restarting']),
2024-04-11 13:42:37 +00:00
'flex gap-2 box-without-bg-without-border dark:bg-coolgray-100 bg-white dark:hover:text-neutral-300 group',
2024-01-07 15:23:41 +00:00
])>
<div class="flex flex-row w-full">
<div class="flex flex-col flex-1">
<div class="pb-2">
@if ($database->human_name)
{{ Str::headline($database->human_name) }}
@else
{{ Str::headline($database->name) }}
@endif
<span class="text-xs">({{ $database->image }})</span>
</div>
@if ($database->configuration_required)
<span class="text-xs text-error">(configuration required)</span>
@endif
@if ($database->description)
<span class="text-xs">{{ Str::limit($database->description, 60) }}</span>
@endif
<div class="text-xs">{{ $database->status }}</div>
</div>
<div class="flex items-center px-4">
v4.0.0-beta.416 (#5729) * feat(README): add InterviewPal sponsorship link and corresponding SVG icon * chore(versions): update coolify version to 4.0.0-beta.413 and nightly version to 4.0.0-beta.414 in configuration files * fix(terminal): enhance WebSocket client verification with authorized IPs in terminal server * chore(versions): update realtime version to 1.0.8 in versions.json * chore(versions): update realtime version to 1.0.8 in versions.json * chore(docker): update soketi image version to 1.0.8 in production configuration files * chore(versions): update coolify version to 4.0.0-beta.414 and nightly version to 4.0.0-beta.415 in configuration files * fix(ApplicationDeploymentJob): ensure source is an object before checking GitHub app properties * fix(ui): Disable livewire navigate feature (causing spam of setInterval()) * fix(ui): Remove required attribute from image input in service application view * fix(ui): Change application image validation to be nullable in service application view * fix(Server): Correct proxy path formatting for Traefik proxy type * chore(versions): update coolify version to 4.0.0-beta.416 and nightly version to 4.0.0-beta.417 in configuration files; fix links in deployment view * feat(Service): Add functionality to convert between applications and databases in docker-compose based applications fix(ui): Fix service layout refresh on compose change * fix(service): graceful shutdown of old container (#5731) * refactor(Database): streamline container shutdown process and reduce timeout duration * fix(ServerCheck): enhance proxy container check to ensure it is running before proceeding * chore(seeder): update git branch from 'main' to 'v4.x' for multiple examples in ApplicationSeeder * fix(applications): include pull_request_id in deployment queue check to prevent duplicate deployments * refactor(core): streamline container stopping process and reduce timeout duration; update related methods for consistency * fix(database): update label for image input field to improve clarity * feat(migration): add 'is_migrated' and 'custom_type' columns to service_applications and service_databases tables * feat(backup): implement custom database type selection and enhance scheduled backups management * fix(ServerCheck): set default proxy status to 'exited' to handle missing container state * fix(database): reduce container stop timeout from 300 to 30 seconds for improved responsiveness * refactor(database): update DB facade usage for consistency across service files * Update app/Livewire/Project/Service/Database.php Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * refactor(database): enhance application conversion logic and add existence checks for databases and applications * refactor(actions): standardize method naming for network and configuration deletion across application and service classes * refactor(logdrain): consolidate log drain stopping logic to reduce redundancy * refactor(StandaloneMariadb): add type hint for destination method to improve code clarity * refactor(DeleteResourceJob): streamline resource deletion logic and improve conditional checks for database types * refactor(jobs): update middleware to prevent job release after expiration for CleanupInstanceStuffsJob, RestartProxyJob, and ServerCheckJob * fix(ui): system theming for charts (#5740) * chore(deps-dev): bump vite from 6.2.6 to 6.3.4 (#5743) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.6 to 6.3.4. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v6.3.4/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 6.3.4 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(dev): mount points?! * fix(dev): proxy mount point * fix(ui): allow adding scheduled backups for non-migrated databases * fix(DatabaseBackupJob): escape PostgreSQL password in backup command (#5759) * fix(ui): correct closing div tag in service index view * Revert "fix(dev): mount points?!" This reverts commit 365bf3cbf0e5aa21a2ccb12fe6ec333b93e404da. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jérémy <jeremy.derdaele@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Best Codes <106822363+The-Best-Codes@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: busybox <29630035+busybox11@users.noreply.github.com>
2025-05-05 07:04:09 +00:00
@if ($database->isBackupSolutionAvailable() || $database->is_migrated)
<a class="mx-4 text-xs font-bold hover:underline"
href="{{ route('project.service.index', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid, 'stack_service_uuid' => $database->uuid]) }}#backups">
Backups
</a>
@endif
<a class="mx-4 text-xs font-bold hover:underline"
href="{{ route('project.service.index', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid, 'stack_service_uuid' => $database->uuid]) }}">
2024-03-25 10:33:38 +00:00
Settings
2024-01-07 15:23:41 +00:00
</a>
@if (str($database->status)->contains('running'))
<x-modal-confirmation title="Confirm Service Database Restart?"
buttonTitle="Restart" submitAction="restartDatabase({{ $database->id }})"
:actions="[
'This service database will be unavailable during the restart.',
'If the service database is currently in use data could be lost.',
]" :confirmWithText="false" :confirmWithPassword="false"
step2ButtonText="Restart Database" />
@endif
2024-01-07 15:23:41 +00:00
</div>
</div>
</div>
@endforeach
</div>
@elseif ($currentRoute === 'project.service.environment-variables')
2024-12-17 10:13:13 +00:00
<livewire:project.shared.environment-variable.all :resource="$service" />
@elseif ($currentRoute === 'project.service.storages')
2024-09-16 13:35:44 +00:00
<div class="flex gap-2 items-center">
2024-01-07 15:23:41 +00:00
<h2>Storages</h2>
</div>
<div class="pb-4">Persistent storage to preserve data between deployments.</div>
<div class="pb-4 dark:text-warning text-coollabs">If you would like to add a volume, you must add it to
your compose file (<a class="underline"
href="{{ route('project.service.configuration', ['project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'service_uuid' => $service->uuid]) }}">General
tab</a>).</div>
2024-01-07 15:23:41 +00:00
@foreach ($applications as $application)
2024-12-17 10:13:13 +00:00
<livewire:project.service.storage wire:key="application-{{ $application->id }}"
:resource="$application" />
2024-01-07 15:23:41 +00:00
@endforeach
@foreach ($databases as $database)
2024-12-17 10:13:13 +00:00
<livewire:project.service.storage wire:key="database-{{ $database->id }}" :resource="$database" />
2024-01-07 15:23:41 +00:00
@endforeach
@elseif ($currentRoute === 'project.service.scheduled-tasks.show')
<livewire:project.shared.scheduled-task.all :resource="$service" />
@elseif ($currentRoute === 'project.service.webhooks')
<livewire:project.shared.webhooks :resource="$service" />
@elseif ($currentRoute === 'project.service.resource-operations')
<livewire:project.shared.resource-operations :resource="$service" />
@elseif ($currentRoute === 'project.service.tags')
<livewire:project.shared.tags :resource="$service" />
@elseif ($currentRoute === 'project.service.danger')
2024-01-07 15:23:41 +00:00
<livewire:project.shared.danger :resource="$service" />
2024-12-17 10:13:13 +00:00
@endif
2024-01-07 15:23:41 +00:00
</div>
</div>
</div>