feat(acl): Change views/backend code to able to use proper ACL's later on. Currently it is not enabled.
This commit is contained in:
@@ -8,76 +8,73 @@
|
||||
<h3>General</h3>
|
||||
@if ($application->git_based())
|
||||
<x-forms.checkbox helper="Automatically deploy new commits based on Git webhooks." instantSave
|
||||
id="isAutoDeployEnabled" label="Auto Deploy" />
|
||||
id="isAutoDeployEnabled" label="Auto Deploy" canGate="update" :canResource="$application" />
|
||||
<x-forms.checkbox
|
||||
helper="Allow to automatically deploy Preview Deployments for all opened PR's.<br><br>Closing a PR will delete Preview Deployments."
|
||||
instantSave id="isPreviewDeploymentsEnabled" label="Preview Deployments" />
|
||||
instantSave id="isPreviewDeploymentsEnabled" label="Preview Deployments" canGate="update"
|
||||
:canResource="$application" />
|
||||
@endif
|
||||
<x-forms.checkbox helper="Disable Docker build cache on every deployment." instantSave id="disableBuildCache"
|
||||
label="Disable Build Cache" />
|
||||
<x-forms.checkbox helper="Disable Docker build cache on every deployment." instantSave
|
||||
id="disableBuildCache" label="Disable Build Cache" canGate="update" :canResource="$application" />
|
||||
|
||||
@if ($application->settings->is_container_label_readonly_enabled)
|
||||
<x-forms.checkbox
|
||||
helper="Your application will be available only on https if your domain starts with https://..."
|
||||
instantSave id="isForceHttpsEnabled" label="Force Https" />
|
||||
instantSave id="isForceHttpsEnabled" label="Force Https" canGate="update" :canResource="$application" />
|
||||
<x-forms.checkbox label="Enable Gzip Compression"
|
||||
helper="You can disable gzip compression if you want. Some services are compressing data by default. In this case, you do not need this."
|
||||
instantSave id="isGzipEnabled" />
|
||||
instantSave id="isGzipEnabled" canGate="update" :canResource="$application" />
|
||||
<x-forms.checkbox helper="Strip Prefix is used to remove prefixes from paths. Like /api/ to /api."
|
||||
instantSave id="isStripprefixEnabled" label="Strip Prefixes" />
|
||||
instantSave id="isStripprefixEnabled" label="Strip Prefixes" canGate="update" :canResource="$application" />
|
||||
@else
|
||||
<x-forms.checkbox disabled
|
||||
helper="Readonly labels are disabled. You need to set the labels in the labels section." instantSave
|
||||
id="isForceHttpsEnabled" label="Force Https" />
|
||||
id="isForceHttpsEnabled" label="Force Https" canGate="update" :canResource="$application" />
|
||||
<x-forms.checkbox label="Enable Gzip Compression" disabled
|
||||
helper="Readonly labels are disabled. You need to set the labels in the labels section." instantSave
|
||||
id="isGzipEnabled" />
|
||||
id="isGzipEnabled" canGate="update" :canResource="$application" />
|
||||
<x-forms.checkbox
|
||||
helper="Readonly labels are disabled. You need to set the labels in the labels section." disabled
|
||||
instantSave id="isStripprefixEnabled" label="Strip Prefixes" />
|
||||
instantSave id="isStripprefixEnabled" label="Strip Prefixes" canGate="update" :canResource="$application" />
|
||||
@endif
|
||||
@if ($application->build_pack === 'dockercompose')
|
||||
<h3>Docker Compose</h3>
|
||||
<x-forms.checkbox instantSave id="isRawComposeDeploymentEnabled" label="Raw Compose Deployment"
|
||||
helper="WARNING: Advanced use cases only. Your docker compose file will be deployed as-is. Nothing is modified by Coolify. You need to configure the proxy parts. More info in the <a class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/compose#raw-docker-compose-deployment'>documentation.</a>" />
|
||||
helper="WARNING: Advanced use cases only. Your docker compose file will be deployed as-is. Nothing is modified by Coolify. You need to configure the proxy parts. More info in the <a class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/compose#raw-docker-compose-deployment'>documentation.</a>"
|
||||
canGate="update" :canResource="$application" />
|
||||
@endif
|
||||
<h3 class="pt-4">Container Names</h3>
|
||||
<x-forms.checkbox
|
||||
helper="The deployed container will have the same name ({{ $application->uuid }}). <span class='font-bold dark:text-warning'>You will lose the rolling update feature!</span>"
|
||||
instantSave id="isConsistentContainerNameEnabled" label="Consistent Container Names" />
|
||||
instantSave id="isConsistentContainerNameEnabled" label="Consistent Container Names" canGate="update"
|
||||
:canResource="$application" />
|
||||
@if ($isConsistentContainerNameEnabled === false)
|
||||
<form class="flex items-end gap-2 " wire:submit.prevent='saveCustomName'>
|
||||
<x-forms.input
|
||||
helper="You can add a custom name for your container.<br><br>The name will be converted to slug format when you save it. <span class='font-bold dark:text-warning'>You will lose the rolling update feature!</span>"
|
||||
instantSave id="customInternalName" label="Custom Container Name" />
|
||||
@can('update', $application)
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.button type="submit" disabled
|
||||
title="You don't have permission to update this application. Contact your team administrator for access.">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
instantSave id="customInternalName" label="Custom Container Name" canGate="update"
|
||||
:canResource="$application" />
|
||||
<x-forms.button canGate="update" :canResource="$application" type="submit">Save</x-forms.button>
|
||||
</form>
|
||||
@endif
|
||||
@if ($application->build_pack === 'dockercompose')
|
||||
<h3 class="pt-4">Network</h3>
|
||||
<x-forms.checkbox instantSave id="isConnectToDockerNetworkEnabled" label="Connect To Predefined Network"
|
||||
helper="By default, you do not reach the Coolify defined networks.<br>Starting a docker compose based resource will have an internal network. <br>If you connect to a Coolify defined network, you maybe need to use different internal DNS names to connect to a resource.<br><br>For more information, check <a class='underline dark:text-white' target='_blank' href='https://coolify.io/docs/knowledge-base/docker/compose#connect-to-predefined-networks'>this</a>." />
|
||||
helper="By default, you do not reach the Coolify defined networks.<br>Starting a docker compose based resource will have an internal network. <br>If you connect to a Coolify defined network, you maybe need to use different internal DNS names to connect to a resource.<br><br>For more information, check <a class='underline dark:text-white' target='_blank' href='https://coolify.io/docs/knowledge-base/docker/compose#connect-to-predefined-networks'>this</a>."
|
||||
canGate="update" :canResource="$application" />
|
||||
@endif
|
||||
<h3 class="pt-4">Logs</h3>
|
||||
<x-forms.checkbox helper="Drain logs to your configured log drain endpoint in your Server settings."
|
||||
instantSave id="isLogDrainEnabled" label="Drain Logs" />
|
||||
instantSave id="isLogDrainEnabled" label="Drain Logs" canGate="update" :canResource="$application" />
|
||||
@if ($application->git_based())
|
||||
<h3>Git</h3>
|
||||
<x-forms.checkbox instantSave id="isGitSubmodulesEnabled" label="Submodules"
|
||||
helper="Allow Git Submodules during build process." />
|
||||
helper="Allow Git Submodules during build process." canGate="update" :canResource="$application" />
|
||||
<x-forms.checkbox instantSave id="isGitLfsEnabled" label="LFS"
|
||||
helper="Allow Git LFS during build process." />
|
||||
helper="Allow Git LFS during build process." canGate="update" :canResource="$application" />
|
||||
<x-forms.checkbox instantSave id="isGitShallowCloneEnabled" label="Shallow Clone"
|
||||
helper="Use shallow cloning (--depth=1) to speed up deployments by only fetching the latest commit history. This reduces clone time and resource usage, especially for large repositories." />
|
||||
helper="Use shallow cloning (--depth=1) to speed up deployments by only fetching the latest commit history. This reduces clone time and resource usage, especially for large repositories."
|
||||
canGate="update" :canResource="$application" />
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -87,16 +84,7 @@
|
||||
<div class="flex gap-2 items-end pt-4">
|
||||
<h3>GPU</h3>
|
||||
@if ($isGpuEnabled)
|
||||
@can('update', $application)
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.button type="submit" disabled
|
||||
title="You don't have permission to update this application. Contact your team administrator for access.">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
<x-forms.button canGate="update" :canResource="$application" type="submit">Save</x-forms.button>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@@ -104,21 +92,23 @@
|
||||
<div class="md:w-96 pb-4">
|
||||
<x-forms.checkbox
|
||||
helper="Enable GPU usage for this application. More info <a href='https://docs.docker.com/compose/gpu-support/' class='underline dark:text-white' target='_blank'>here</a>."
|
||||
instantSave id="isGpuEnabled" label="Enable GPU" />
|
||||
instantSave id="isGpuEnabled" label="Enable GPU" canGate="update" :canResource="$application" />
|
||||
</div>
|
||||
@endif
|
||||
@if ($isGpuEnabled)
|
||||
<div class="flex flex-col w-full gap-2 ">
|
||||
<div class="flex gap-2 items-end">
|
||||
<x-forms.input label="GPU Driver" id="gpuDriver"> </x-forms.input>
|
||||
<x-forms.input label="GPU Count" placeholder="empty means use all GPUs" id="gpuCount">
|
||||
<x-forms.input label="GPU Driver" id="gpuDriver" canGate="update" :canResource="$application">
|
||||
</x-forms.input>
|
||||
<x-forms.input label="GPU Count" placeholder="empty means use all GPUs" id="gpuCount"
|
||||
canGate="update" :canResource="$application">
|
||||
</x-forms.input>
|
||||
</div>
|
||||
|
||||
<x-forms.input label="GPU Device Ids" placeholder="0,2"
|
||||
helper="Comma separated list of device ids. More info <a href='https://docs.docker.com/compose/gpu-support/#access-specific-devices' class='underline dark:text-white' target='_blank'>here</a>."
|
||||
id="gpuDeviceIds"> </x-forms.input>
|
||||
<x-forms.textarea rows="10" label="GPU Options" id="gpuOptions"> </x-forms.textarea>
|
||||
id="gpuDeviceIds" canGate="update" :canResource="$application"> </x-forms.input>
|
||||
<x-forms.textarea rows="10" label="GPU Options" id="gpuOptions" canGate="update"
|
||||
:canResource="$application"> </x-forms.textarea>
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
|
||||
@@ -1,56 +1,35 @@
|
||||
<div x-data="{ initLoadingCompose: $wire.entangle('initLoadingCompose') }">
|
||||
<div x-data="{
|
||||
initLoadingCompose: $wire.entangle('initLoadingCompose'),
|
||||
canUpdate: @js(auth()->user()->can('update', $application)),
|
||||
shouldDisable() {
|
||||
return this.initLoadingCompose || !this.canUpdate;
|
||||
}
|
||||
}">
|
||||
<form wire:submit='submit' class="flex flex-col pb-32">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>General</h2>
|
||||
@can('update', $application)
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.button type="submit" disabled
|
||||
title="You don't have permission to update this application. Contact your team administrator for access.">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
|
||||
{{-- <x-forms.button wire:click="downloadConfig">
|
||||
Download Config
|
||||
</x-forms.button> --}}
|
||||
{{-- <x-modal-input buttonTitle="Upload Config" title="Upload Config" :closeOutside="false">
|
||||
<livewire:project.shared.upload-config :applicationId="$application->id" />
|
||||
</x-modal-input> --}}
|
||||
|
||||
<x-forms.button canGate="update" :canResource="$application" type="submit">Save</x-forms.button>
|
||||
</div>
|
||||
<div>General configuration for your application.</div>
|
||||
<div class="flex flex-col gap-2 py-4">
|
||||
<div class="flex flex-col items-end gap-2 xl:flex-row">
|
||||
<x-forms.input x-bind:disabled="initLoadingCompose" id="application.name" label="Name" required />
|
||||
<x-forms.input x-bind:disabled="initLoadingCompose" id="application.description" label="Description" />
|
||||
<x-forms.input x-bind:disabled="shouldDisable()" id="application.name" label="Name" required />
|
||||
<x-forms.input x-bind:disabled="shouldDisable()" id="application.description" label="Description" />
|
||||
</div>
|
||||
|
||||
@if (!$application->dockerfile && $application->build_pack !== 'dockerimage')
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex gap-2">
|
||||
@can('update', $application)
|
||||
<x-forms.select x-bind:disabled="initLoadingCompose" wire:model.live="application.build_pack"
|
||||
label="Build Pack" required>
|
||||
<option value="nixpacks">Nixpacks</option>
|
||||
<option value="static">Static</option>
|
||||
<option value="dockerfile">Dockerfile</option>
|
||||
<option value="dockercompose">Docker Compose</option>
|
||||
</x-forms.select>
|
||||
@else
|
||||
<x-forms.select disabled label="Build Pack" required>
|
||||
<option value="nixpacks" @if ($application->build_pack === 'nixpacks') selected @endif>Nixpacks</option>
|
||||
<option value="static" @if ($application->build_pack === 'static') selected @endif>Static</option>
|
||||
<option value="dockerfile" @if ($application->build_pack === 'dockerfile') selected @endif>Dockerfile
|
||||
</option>
|
||||
<option value="dockercompose" @if ($application->build_pack === 'dockercompose') selected @endif>Docker
|
||||
Compose</option>
|
||||
</x-forms.select>
|
||||
@endcan
|
||||
<x-forms.select x-bind:disabled="shouldDisable()" wire:model.live="application.build_pack"
|
||||
label="Build Pack" required>
|
||||
<option value="nixpacks">Nixpacks</option>
|
||||
<option value="static">Static</option>
|
||||
<option value="dockerfile">Dockerfile</option>
|
||||
<option value="dockercompose">Docker Compose</option>
|
||||
</x-forms.select>
|
||||
@if ($application->settings->is_static || $application->build_pack === 'static')
|
||||
<x-forms.select id="application.static_image" label="Static Image" required>
|
||||
<x-forms.select x-bind:disabled="!canUpdate" id="application.static_image"
|
||||
label="Static Image" required>
|
||||
<option value="nginx:alpine">nginx:alpine</option>
|
||||
<option disabled value="apache:alpine">apache:alpine</option>
|
||||
</x-forms.select>
|
||||
@@ -69,7 +48,8 @@
|
||||
<x-forms.input
|
||||
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. "
|
||||
label="Domains for {{ str($serviceName)->headline() }}"
|
||||
id="parsedServiceDomains.{{ str($serviceName)->slug('_') }}.domain"></x-forms.input>
|
||||
id="parsedServiceDomains.{{ str($serviceName)->slug('_') }}.domain"
|
||||
x-bind:disabled="shouldDisable()"></x-forms.input>
|
||||
@can('update', $application)
|
||||
<x-forms.button wire:click="generateDomain('{{ $serviceName }}')">Generate
|
||||
Domain</x-forms.button>
|
||||
@@ -85,27 +65,23 @@
|
||||
@if ($application->settings->is_static || $application->build_pack === 'static')
|
||||
<x-forms.textarea id="application.custom_nginx_configuration"
|
||||
placeholder="Empty means default configuration will be used." label="Custom Nginx Configuration"
|
||||
helper="You can add custom Nginx configuration here." />
|
||||
helper="You can add custom Nginx configuration here." x-bind:disabled="!canUpdate" />
|
||||
@can('update', $application)
|
||||
<x-forms.button wire:click="generateNginxConfiguration">
|
||||
Generate Default Nginx Configuration
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.button wire:click="generateNginxConfiguration" disabled
|
||||
title="You don't have permission to update this application. Contact your team administrator for access.">
|
||||
Generate Default Nginx Configuration
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
@endif
|
||||
<div class="w-96 pb-6">
|
||||
@if ($application->could_set_build_commands())
|
||||
<x-forms.checkbox instantSave id="application.settings.is_static" label="Is it a static site?"
|
||||
helper="If your application is a static site or the final build assets should be served as a static site, enable this." />
|
||||
helper="If your application is a static site or the final build assets should be served as a static site, enable this."
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@endif
|
||||
@if ($application->settings->is_static && $application->build_pack !== 'static')
|
||||
<x-forms.checkbox label="Is it a SPA (Single Page Application)?"
|
||||
helper="If your application is a SPA, enable this." id="application.settings.is_spa"
|
||||
instantSave></x-forms.checkbox>
|
||||
helper="If your application is a SPA, enable this." id="application.settings.is_spa" instantSave
|
||||
x-bind:disabled="!canUpdate"></x-forms.checkbox>
|
||||
@endif
|
||||
</div>
|
||||
@if ($application->build_pack !== 'dockercompose')
|
||||
@@ -113,11 +89,13 @@
|
||||
@if ($application->settings->is_container_label_readonly_enabled == false)
|
||||
<x-forms.input placeholder="https://coolify.io" wire:model.blur-sm="application.fqdn"
|
||||
label="Domains" readonly
|
||||
helper="Readonly labels are disabled. You can set the domains in the labels section." />
|
||||
helper="Readonly labels are disabled. You can set the domains in the labels section."
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@else
|
||||
<x-forms.input placeholder="https://coolify.io" wire:model.blur-sm="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. " />
|
||||
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. "
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@can('update', $application)
|
||||
<x-forms.button wire:click="getWildcardDomain">Generate Domain
|
||||
</x-forms.button>
|
||||
@@ -128,32 +106,38 @@
|
||||
@if ($application->settings->is_container_label_readonly_enabled == false)
|
||||
@if ($application->redirect === 'both')
|
||||
<x-forms.input label="Direction" value="Allow www & non-www." readonly
|
||||
helper="Readonly labels are disabled. You can set the direction in the labels section." />
|
||||
helper="Readonly labels are disabled. You can set the direction in the labels section."
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@elseif ($application->redirect === 'www')
|
||||
<x-forms.input label="Direction" value="Redirect to www." readonly
|
||||
helper="Readonly labels are disabled. You can set the direction in the labels section." />
|
||||
helper="Readonly labels are disabled. You can set the direction in the labels section."
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@elseif ($application->redirect === 'non-www')
|
||||
<x-forms.input label="Direction" value="Redirect to non-www." readonly
|
||||
helper="Readonly labels are disabled. You can set the direction in the labels section." />
|
||||
helper="Readonly labels are disabled. You can set the direction in the labels section."
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@endif
|
||||
@else
|
||||
<x-forms.select label="Direction" id="application.redirect" required
|
||||
helper="You must need to add www and non-www as an A DNS record. Make sure the www domain is added under Domains.">
|
||||
helper="You must need to add www and non-www as an A DNS record. Make sure the www domain is added under Domains."
|
||||
x-bind:disabled="!canUpdate">
|
||||
<option value="both">Allow www & non-www.</option>
|
||||
<option value="www">Redirect to www.</option>
|
||||
<option value="non-www">Redirect to non-www.</option>
|
||||
</x-forms.select>
|
||||
@if ($application->settings->is_container_label_readonly_enabled)
|
||||
<x-modal-confirmation title="Confirm Redirection Setting?" buttonTitle="Set Direction"
|
||||
submitAction="setRedirect" :actions="['All traffic will be redirected to the selected direction.']"
|
||||
confirmationText="{{ $application->fqdn . '/' }}"
|
||||
confirmationLabel="Please confirm the execution of the action by entering the Application URL below"
|
||||
shortConfirmationLabel="Application URL" :confirmWithPassword="false"
|
||||
step2ButtonText="Set Direction">
|
||||
<x-slot:customButton>
|
||||
<div class="w-[7.2rem]">Set Direction</div>
|
||||
</x-slot:customButton>
|
||||
</x-modal-confirmation>
|
||||
@can('update', $application)
|
||||
<x-modal-confirmation title="Confirm Redirection Setting?" buttonTitle="Set Direction"
|
||||
submitAction="setRedirect" :actions="['All traffic will be redirected to the selected direction.']"
|
||||
confirmationText="{{ $application->fqdn . '/' }}"
|
||||
confirmationLabel="Please confirm the execution of the action by entering the Application URL below"
|
||||
shortConfirmationLabel="Application URL" :confirmWithPassword="false"
|
||||
step2ButtonText="Set Direction">
|
||||
<x-slot:customButton>
|
||||
<div class="w-[7.2rem]">Set Direction</div>
|
||||
</x-slot:customButton>
|
||||
</x-modal-confirmation>
|
||||
@endcan
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
@@ -177,11 +161,15 @@
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
@if ($application->build_pack === 'dockerimage')
|
||||
@if ($application->destination->server->isSwarm())
|
||||
<x-forms.input required id="application.docker_registry_image_name" label="Docker Image" />
|
||||
<x-forms.input id="application.docker_registry_image_tag" label="Docker Image Tag" />
|
||||
<x-forms.input required id="application.docker_registry_image_name" label="Docker Image"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
<x-forms.input id="application.docker_registry_image_tag" label="Docker Image Tag"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@else
|
||||
<x-forms.input id="application.docker_registry_image_name" label="Docker Image" />
|
||||
<x-forms.input id="application.docker_registry_image_tag" label="Docker Image Tag" />
|
||||
<x-forms.input id="application.docker_registry_image_name" label="Docker Image"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
<x-forms.input id="application.docker_registry_image_tag" label="Docker Image Tag"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@endif
|
||||
@else
|
||||
@if (
|
||||
@@ -189,19 +177,20 @@
|
||||
$application->additional_servers->count() > 0 ||
|
||||
$application->settings->is_build_server_enabled)
|
||||
<x-forms.input id="application.docker_registry_image_name" required label="Docker Image"
|
||||
placeholder="Required!" />
|
||||
placeholder="Required!" x-bind:disabled="!canUpdate" />
|
||||
<x-forms.input id="application.docker_registry_image_tag"
|
||||
helper="If set, it will tag the built image with this tag too. <br><br>Example: If you set it to 'latest', it will push the image with the commit sha tag + with the latest tag."
|
||||
placeholder="Empty means latest will be used." label="Docker Image Tag" />
|
||||
placeholder="Empty means latest will be used." label="Docker Image Tag"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@else
|
||||
<x-forms.input id="application.docker_registry_image_name"
|
||||
helper="Empty means it won't push the image to a docker registry."
|
||||
placeholder="Empty means it won't push the image to a docker registry."
|
||||
label="Docker Image" />
|
||||
label="Docker Image" x-bind:disabled="!canUpdate" />
|
||||
<x-forms.input id="application.docker_registry_image_tag"
|
||||
placeholder="Empty means only push commit sha tag."
|
||||
helper="If set, it will tag the built image with this tag too. <br><br>Example: If you set it to 'latest', it will push the image with the commit sha tag + with the latest tag."
|
||||
label="Docker Image Tag" />
|
||||
label="Docker Image Tag" x-bind:disabled="!canUpdate" />
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
@@ -212,17 +201,21 @@
|
||||
<x-forms.input
|
||||
helper="You can add custom docker run options that will be used when your container is started.<br>Note: Not all options are supported, as they could mess up Coolify's automation and could cause bad experience for users.<br><br>Check the <a class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/custom-commands'>docs.</a>"
|
||||
placeholder="--cap-add SYS_ADMIN --device=/dev/fuse --security-opt apparmor:unconfined --ulimit nofile=1024:1024 --tmpfs /run:rw,noexec,nosuid,size=65536k --hostname=myapp"
|
||||
id="application.custom_docker_run_options" label="Custom Docker Options" />
|
||||
id="application.custom_docker_run_options" label="Custom Docker Options"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@else
|
||||
@if ($application->could_set_build_commands())
|
||||
@if ($application->build_pack === 'nixpacks')
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
<x-forms.input helper="If you modify this, you probably need to have a nixpacks.toml"
|
||||
id="application.install_command" label="Install Command" />
|
||||
id="application.install_command" label="Install Command"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
<x-forms.input helper="If you modify this, you probably need to have a nixpacks.toml"
|
||||
id="application.build_command" label="Build Command" />
|
||||
id="application.build_command" label="Build Command"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
<x-forms.input helper="If you modify this, you probably need to have a nixpacks.toml"
|
||||
id="application.start_command" label="Start Command" />
|
||||
id="application.start_command" label="Start Command"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
</div>
|
||||
<div class="pt-1 text-xs">Nixpacks will detect the required configuration
|
||||
automatically.
|
||||
@@ -240,10 +233,10 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
@endcan
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input x-bind:disabled="initLoadingCompose" placeholder="/"
|
||||
<x-forms.input x-bind:disabled="shouldDisable()" placeholder="/"
|
||||
id="application.base_directory" label="Base Directory"
|
||||
helper="Directory to use as root. Useful for monorepos." />
|
||||
<x-forms.input x-bind:disabled="initLoadingCompose"
|
||||
<x-forms.input x-bind:disabled="shouldDisable()"
|
||||
placeholder="/docker-compose.yaml"
|
||||
id="application.docker_compose_location" label="Docker Compose Location"
|
||||
helper="It is calculated together with the Base Directory:<br><span class='dark:text-warning'>{{ Str::start($application->base_directory . $application->docker_compose_location, '/') }}</span>" />
|
||||
@@ -252,7 +245,8 @@
|
||||
<x-forms.checkbox instantSave
|
||||
id="application.settings.is_preserve_repository_enabled"
|
||||
label="Preserve Repository During Deployment"
|
||||
helper="Git repository (based on the base directory settings) will be copied to the deployment directory." />
|
||||
helper="Git repository (based on the base directory settings) will be copied to the deployment directory."
|
||||
x-bind:disabled="shouldDisable()" />
|
||||
</div>
|
||||
<div class="pt-4">The following commands are for advanced use cases.
|
||||
Only
|
||||
@@ -260,13 +254,13 @@
|
||||
know what are
|
||||
you doing.</div>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input placeholder="docker compose build"
|
||||
x-bind:disabled="initLoadingCompose"
|
||||
<x-forms.input x-bind:disabled="shouldDisable()"
|
||||
placeholder="docker compose build"
|
||||
id="application.docker_compose_custom_build_command"
|
||||
helper="If you use this, you need to specify paths relatively and should use the same compose file in the custom command, otherwise the automatically configured labels / etc won't work.<br><br>So in your case, use: <span class='dark:text-warning'>docker compose -f .{{ Str::start($application->base_directory . $application->docker_compose_location, '/') }} build</span>"
|
||||
label="Custom Build Command" />
|
||||
<x-forms.input placeholder="docker compose up -d"
|
||||
x-bind:disabled="initLoadingCompose"
|
||||
<x-forms.input x-bind:disabled="shouldDisable()"
|
||||
placeholder="docker compose up -d"
|
||||
id="application.docker_compose_custom_start_command"
|
||||
helper="If you use this, you need to specify paths relatively and should use the same compose file in the custom command, otherwise the automatically configured labels / etc won't work.<br><br>So in your case, use: <span class='dark:text-warning'>docker compose -f .{{ Str::start($application->base_directory . $application->docker_compose_location, '/') }} up -d</span>"
|
||||
label="Custom Start Command" />
|
||||
@@ -276,25 +270,28 @@
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
<x-forms.input placeholder="/" id="application.base_directory"
|
||||
label="Base Directory"
|
||||
helper="Directory to use as root. Useful for monorepos." />
|
||||
helper="Directory to use as root. Useful for monorepos."
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@if ($application->build_pack === 'dockerfile' && !$application->dockerfile)
|
||||
<x-forms.input placeholder="/Dockerfile" id="application.dockerfile_location"
|
||||
label="Dockerfile Location"
|
||||
helper="It is calculated together with the Base Directory:<br><span class='dark:text-warning'>{{ Str::start($application->base_directory . $application->dockerfile_location, '/') }}</span>" />
|
||||
helper="It is calculated together with the Base Directory:<br><span class='dark:text-warning'>{{ Str::start($application->base_directory . $application->dockerfile_location, '/') }}</span>"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@endif
|
||||
|
||||
@if ($application->build_pack === 'dockerfile')
|
||||
<x-forms.input id="application.dockerfile_target_build"
|
||||
label="Docker Build Stage Target"
|
||||
helper="Useful if you have multi-staged dockerfile." />
|
||||
helper="Useful if you have multi-staged dockerfile."
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@endif
|
||||
@if ($application->could_set_build_commands())
|
||||
@if ($application->settings->is_static)
|
||||
<x-forms.input placeholder="/dist" id="application.publish_directory"
|
||||
label="Publish Directory" required />
|
||||
label="Publish Directory" required x-bind:disabled="!canUpdate" />
|
||||
@else
|
||||
<x-forms.input placeholder="/" id="application.publish_directory"
|
||||
label="Publish Directory" />
|
||||
label="Publish Directory" x-bind:disabled="!canUpdate" />
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@@ -304,20 +301,21 @@
|
||||
<x-forms.textarea
|
||||
helper="Gitignore-style rules to filter Git based webhook deployments."
|
||||
placeholder="src/pages/**" id="application.watch_paths"
|
||||
label="Watch Paths" />
|
||||
label="Watch Paths" x-bind:disabled="!canUpdate" />
|
||||
</div>
|
||||
@endif
|
||||
<x-forms.input
|
||||
helper="You can add custom docker run options that will be used when your container is started.<br>Note: Not all options are supported, as they could mess up Coolify's automation and could cause bad experience for users.<br><br>Check the <a class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/custom-commands'>docs.</a>"
|
||||
placeholder="--cap-add SYS_ADMIN --device=/dev/fuse --security-opt apparmor:unconfined --ulimit nofile=1024:1024 --tmpfs /run:rw,noexec,nosuid,size=65536k --hostname=myapp"
|
||||
id="application.custom_docker_run_options" label="Custom Docker Options" />
|
||||
id="application.custom_docker_run_options" label="Custom Docker Options"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
|
||||
@if ($application->build_pack !== 'dockercompose')
|
||||
<div class="pt-2 w-96">
|
||||
<x-forms.checkbox
|
||||
helper="Use a build server to build your application. You can configure your build server in the Server settings. For more info, check the <a href='https://coolify.io/docs/knowledge-base/server/build-server' class='underline' target='_blank'>documentation</a>."
|
||||
instantSave id="application.settings.is_build_server_enabled"
|
||||
label="Use a Build Server?" />
|
||||
label="Use a Build Server?" x-bind:disabled="!canUpdate" />
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
@@ -327,8 +325,10 @@
|
||||
@if ($application->build_pack === 'dockercompose')
|
||||
<div class="flex items-center gap-2 pb-4">
|
||||
<h3>Docker Compose</h3>
|
||||
<x-forms.button wire:target='initLoadingCompose'
|
||||
x-on:click="$wire.dispatch('loadCompose', false)">Reload Compose File</x-forms.button>
|
||||
@can('update', $application)
|
||||
<x-forms.button wire:target='initLoadingCompose'
|
||||
x-on:click="$wire.dispatch('loadCompose', false)">Reload Compose File</x-forms.button>
|
||||
@endcan
|
||||
</div>
|
||||
@if ($application->settings->is_raw_compose_deployment_enabled)
|
||||
<x-forms.textarea rows="10" readonly id="application.docker_compose_raw"
|
||||
@@ -350,7 +350,8 @@
|
||||
<div class="w-96">
|
||||
<x-forms.checkbox label="Escape special characters in labels?"
|
||||
helper="By default, $ (and other chars) is escaped. So if you write $ in the labels, it will be saved as $$.<br><br>If you want to use env variables inside the labels, turn this off."
|
||||
id="application.settings.is_container_label_escape_enabled" instantSave></x-forms.checkbox>
|
||||
id="application.settings.is_container_label_escape_enabled" instantSave
|
||||
x-bind:disabled="!canUpdate"></x-forms.checkbox>
|
||||
{{-- <x-forms.checkbox label="Readonly labels"
|
||||
helper="Labels are readonly by default. Readonly means that edits you do to the labels could be lost and Coolify will autogenerate the labels for you. If you want to edit the labels directly, disable this option. <br><br>Be careful, it could break the proxy configuration after you restart the container as Coolify will now NOT autogenerate the labels for you (ofc you can always reset the labels to the coolify defaults manually)."
|
||||
id="application.settings.is_container_label_readonly_enabled" instantSave></x-forms.checkbox> --}}
|
||||
@@ -358,32 +359,36 @@
|
||||
@endif
|
||||
@if ($application->dockerfile)
|
||||
<x-forms.textarea label="Dockerfile" id="application.dockerfile" monacoEditorLanguage="dockerfile"
|
||||
useMonacoEditor rows="6"> </x-forms.textarea>
|
||||
useMonacoEditor rows="6" x-bind:disabled="!canUpdate"> </x-forms.textarea>
|
||||
@endif
|
||||
@if ($application->build_pack !== 'dockercompose')
|
||||
<h3 class="pt-8">Network</h3>
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
@if ($application->settings->is_static || $application->build_pack === 'static')
|
||||
<x-forms.input id="application.ports_exposes" label="Ports Exposes" readonly />
|
||||
<x-forms.input id="application.ports_exposes" label="Ports Exposes" readonly
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@else
|
||||
@if ($application->settings->is_container_label_readonly_enabled === false)
|
||||
<x-forms.input placeholder="3000,3001" id="application.ports_exposes"
|
||||
label="Ports Exposes" readonly
|
||||
helper="Readonly labels are disabled. You can set the ports manually in the labels section." />
|
||||
helper="Readonly labels are disabled. You can set the ports manually in the labels section."
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@else
|
||||
<x-forms.input placeholder="3000,3001" id="application.ports_exposes"
|
||||
label="Ports Exposes" required
|
||||
helper="A comma separated list of ports your application uses. The first port will be used as default healthcheck port if nothing defined in the Healthcheck menu. Be sure to set this correctly." />
|
||||
helper="A comma separated list of ports your application uses. The first port will be used as default healthcheck port if nothing defined in the Healthcheck menu. Be sure to set this correctly."
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@endif
|
||||
@endif
|
||||
@if (!$application->destination->server->isSwarm())
|
||||
<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><br><span class='inline-block font-bold dark:text-warning'>Example:</span><br>3000:3000,3002:3002<br><br>Rolling update is not supported if you have a port mapped to the host." />
|
||||
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><br><span class='inline-block font-bold dark:text-warning'>Example:</span><br>3000:3000,3002:3002<br><br>Rolling update is not supported if you have a port mapped to the host."
|
||||
x-bind:disabled="!canUpdate" />
|
||||
@endif
|
||||
@if (!$application->destination->server->isSwarm())
|
||||
<x-forms.input id="application.custom_network_aliases" label="Network Aliases"
|
||||
helper="A comma separated list of custom network aliases you would like to add for container in Docker network.<br><br><span class='inline-block font-bold dark:text-warning'>Example:</span><br>api.internal,api.local"
|
||||
wire:model="application.custom_network_aliases" />
|
||||
wire:model="application.custom_network_aliases" x-bind:disabled="!canUpdate" />
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -391,60 +396,66 @@
|
||||
<div>
|
||||
<div class="w-96">
|
||||
<x-forms.checkbox helper="This will add the proper proxy labels to the container." instantSave
|
||||
label="Enable" id="application.is_http_basic_auth_enabled" />
|
||||
label="Enable" id="application.is_http_basic_auth_enabled"
|
||||
x-bind:disabled="!canUpdate" />
|
||||
</div>
|
||||
@if ($application->is_http_basic_auth_enabled)
|
||||
<div class="flex gap-2 py-2">
|
||||
<x-forms.input id="application.http_basic_auth_username" label="Username" required />
|
||||
<x-forms.input id="application.http_basic_auth_username" label="Username" required
|
||||
x-bind:disabled="!canUpdate" />
|
||||
<x-forms.input id="application.http_basic_auth_password" type="password" label="Password"
|
||||
required />
|
||||
required x-bind:disabled="!canUpdate" />
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($application->settings->is_container_label_readonly_enabled)
|
||||
<x-forms.textarea readonly disabled label="Container Labels" rows="15" id="customLabels"
|
||||
monacoEditorLanguage="ini" useMonacoEditor></x-forms.textarea>
|
||||
monacoEditorLanguage="ini" useMonacoEditor x-bind:disabled="!canUpdate"></x-forms.textarea>
|
||||
@else
|
||||
<x-forms.textarea label="Container Labels" rows="15" id="customLabels"
|
||||
monacoEditorLanguage="ini" useMonacoEditor></x-forms.textarea>
|
||||
monacoEditorLanguage="ini" useMonacoEditor x-bind:disabled="!canUpdate"></x-forms.textarea>
|
||||
@endif
|
||||
<div class="w-96">
|
||||
<x-forms.checkbox label="Readonly labels"
|
||||
helper="Labels are readonly by default. Readonly means that edits you do to the labels could be lost and Coolify will autogenerate the labels for you. If you want to edit the labels directly, disable this option. <br><br>Be careful, it could break the proxy configuration after you restart the container as Coolify will now NOT autogenerate the labels for you (ofc you can always reset the labels to the coolify defaults manually)."
|
||||
id="application.settings.is_container_label_readonly_enabled" instantSave></x-forms.checkbox>
|
||||
id="application.settings.is_container_label_readonly_enabled" instantSave
|
||||
x-bind:disabled="!canUpdate"></x-forms.checkbox>
|
||||
<x-forms.checkbox label="Escape special characters in labels?"
|
||||
helper="By default, $ (and other chars) is escaped. So if you write $ in the labels, it will be saved as $$.<br><br>If you want to use env variables inside the labels, turn this off."
|
||||
id="application.settings.is_container_label_escape_enabled" instantSave></x-forms.checkbox>
|
||||
id="application.settings.is_container_label_escape_enabled" instantSave
|
||||
x-bind:disabled="!canUpdate"></x-forms.checkbox>
|
||||
</div>
|
||||
<x-modal-confirmation title="Confirm Labels Reset to Coolify Defaults?"
|
||||
buttonTitle="Reset Labels to Defaults" buttonFullWidth submitAction="resetDefaultLabels(true)"
|
||||
:actions="[
|
||||
'All your custom proxy labels will be lost.',
|
||||
'Proxy labels (traefik, caddy, etc) will be reset to the coolify defaults.',
|
||||
]" confirmationText="{{ $application->fqdn . '/' }}"
|
||||
confirmationLabel="Please confirm the execution of the actions by entering the Application URL below"
|
||||
shortConfirmationLabel="Application URL" :confirmWithPassword="false"
|
||||
step2ButtonText="Permanently Reset Labels" />
|
||||
@can('update', $application)
|
||||
<x-modal-confirmation title="Confirm Labels Reset to Coolify Defaults?"
|
||||
buttonTitle="Reset Labels to Defaults" buttonFullWidth submitAction="resetDefaultLabels(true)"
|
||||
:actions="[
|
||||
'All your custom proxy labels will be lost.',
|
||||
'Proxy labels (traefik, caddy, etc) will be reset to the coolify defaults.',
|
||||
]" confirmationText="{{ $application->fqdn . '/' }}"
|
||||
confirmationLabel="Please confirm the execution of the actions by entering the Application URL below"
|
||||
shortConfirmationLabel="Application URL" :confirmWithPassword="false"
|
||||
step2ButtonText="Permanently Reset Labels" />
|
||||
@endcan
|
||||
@endif
|
||||
|
||||
<h3 class="pt-8">Pre/Post Deployment Commands</h3>
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
<x-forms.input x-bind:disabled="initLoadingCompose" placeholder="php artisan migrate"
|
||||
<x-forms.input x-bind:disabled="shouldDisable()" placeholder="php artisan migrate"
|
||||
id="application.pre_deployment_command" label="Pre-deployment "
|
||||
helper="An optional script or command to execute in the existing container before the deployment begins.<br>It is always executed with 'sh -c', so you do not need add it manually." />
|
||||
@if ($application->build_pack === 'dockercompose')
|
||||
<x-forms.input x-bind:disabled="initLoadingCompose"
|
||||
id="application.pre_deployment_command_container" label="Container Name"
|
||||
<x-forms.input x-bind:disabled="shouldDisable()" id="application.pre_deployment_command_container"
|
||||
label="Container Name"
|
||||
helper="The name of the container to execute within. You can leave it blank if your application only has one container." />
|
||||
@endif
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
<x-forms.input x-bind:disabled="initLoadingCompose" placeholder="php artisan migrate"
|
||||
<x-forms.input x-bind:disabled="shouldDisable()" placeholder="php artisan migrate"
|
||||
id="application.post_deployment_command" label="Post-deployment "
|
||||
helper="An optional script or command to execute in the newly built container after the deployment completes.<br>It is always executed with 'sh -c', so you do not need add it manually." />
|
||||
@if ($application->build_pack === 'dockercompose')
|
||||
<x-forms.input x-bind:disabled="initLoadingCompose"
|
||||
<x-forms.input x-bind:disabled="shouldDisable()"
|
||||
id="application.post_deployment_command_container" label="Container Name"
|
||||
helper="The name of the container to execute within. You can leave it blank if your application only has one container." />
|
||||
@endif
|
||||
|
||||
@@ -15,10 +15,12 @@
|
||||
Logs
|
||||
</a>
|
||||
@if (!$application->destination->server->isSwarm())
|
||||
<a class="{{ request()->routeIs('project.application.command') ? 'dark:text-white' : '' }}"
|
||||
href="{{ route('project.application.command', $parameters) }}">
|
||||
Terminal
|
||||
</a>
|
||||
@can('canAccessTerminal')
|
||||
<a class="{{ request()->routeIs('project.application.command') ? 'dark:text-white' : '' }}"
|
||||
href="{{ route('project.application.command', $parameters) }}">
|
||||
Terminal
|
||||
</a>
|
||||
@endcan
|
||||
@endif
|
||||
<x-applications.links :application="$application" />
|
||||
</nav>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<form wire:submit='submit'>
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Preview Deployments</h2>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
<x-forms.button isHighlighted wire:click="resetToDefault">Reset template to default</x-forms.button>
|
||||
@can('update', $application)
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
<x-forms.button isHighlighted wire:click="resetToDefault">Reset template to default</x-forms.button>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="pb-4 ">Preview Deployments based on pull requests are here.</div>
|
||||
<div class="flex flex-col gap-2 pb-4">
|
||||
<x-forms.input id="previewUrlTemplate" label="Preview URL Template"
|
||||
helper="Templates:<br/><span class='text-helper'>@@{{ random }}</span> to generate random sub-domain each time a PR is deployed<br/><span class='text-helper'>@@{{ pr_id }}</span> to use pull request ID as sub-domain or <span class='text-helper'>@@{{ domain }}</span> to replace the domain name with the application's domain name." />
|
||||
helper="Templates:<br/><span class='text-helper'>@@{{ random }}</span> to generate random sub-domain each time a PR is deployed<br/><span class='text-helper'>@@{{ pr_id }}</span> to use pull request ID as sub-domain or <span class='text-helper'>@@{{ domain }}</span> to replace the domain name with the application's domain name." canGate="update" :canResource="$application" />
|
||||
@if ($previewUrlTemplate)
|
||||
<div class="">Domain Preview: {{ $previewUrlTemplate }}</div>
|
||||
@endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<form wire:submit="save" class="flex items-end gap-2">
|
||||
<x-forms.input helper="One domain per preview." label="Domains for {{ str($serviceName)->headline() }}"
|
||||
id="service.domain"></x-forms.input>
|
||||
id="service.domain" canGate="update" :canResource="$preview->application"></x-forms.input>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
<x-forms.button wire:click="generate">Generate
|
||||
Domain</x-forms.button>
|
||||
|
||||
@@ -7,9 +7,11 @@
|
||||
<div>
|
||||
@if ($application->is_github_based())
|
||||
<div class="flex items-center gap-2">
|
||||
<h3>Pull Requests on Git</h3>
|
||||
<x-forms.button wire:click="load_prs">Load Pull Requests
|
||||
</x-forms.button>
|
||||
@can('update', $application)
|
||||
<h3>Pull Requests on Git</h3>
|
||||
<x-forms.button wire:click="load_prs">Load Pull Requests
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
</div>
|
||||
@endif
|
||||
@isset($rate_limit_remaining)
|
||||
@@ -40,19 +42,23 @@
|
||||
</a>
|
||||
</td>
|
||||
<td class="flex flex-col gap-1 md:flex-row">
|
||||
<x-forms.button
|
||||
wire:click="add('{{ data_get($pull_request, 'number') }}', '{{ data_get($pull_request, 'html_url') }}')">
|
||||
Configure
|
||||
</x-forms.button>
|
||||
<x-forms.button
|
||||
wire:click="add_and_deploy('{{ data_get($pull_request, 'number') }}', '{{ data_get($pull_request, 'html_url') }}')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
|
||||
fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M7 4v16l13 -8z" />
|
||||
</svg>Deploy
|
||||
</x-forms.button>
|
||||
@can('update', $application)
|
||||
<x-forms.button
|
||||
wire:click="add('{{ data_get($pull_request, 'number') }}', '{{ data_get($pull_request, 'html_url') }}')">
|
||||
Configure
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
@can('deploy', $application)
|
||||
<x-forms.button
|
||||
wire:click="add_and_deploy('{{ data_get($pull_request, 'number') }}', '{{ data_get($pull_request, 'html_url') }}')">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
|
||||
fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M7 4v16l13 -8z" />
|
||||
</svg>Deploy
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@@ -106,10 +112,12 @@
|
||||
<form wire:submit="save_preview('{{ $preview->id }}')"
|
||||
class="flex items-end gap-2 pt-4">
|
||||
<x-forms.input label="Domain" helper="One domain per preview."
|
||||
id="application.previews.{{ $previewName }}.fqdn"></x-forms.input>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
<x-forms.button wire:click="generate_preview('{{ $preview->id }}')">Generate
|
||||
Domain</x-forms.button>
|
||||
id="application.previews.{{ $previewName }}.fqdn" canGate="update" :canResource="$application"></x-forms.input>
|
||||
@can('update', $application)
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
<x-forms.button wire:click="generate_preview('{{ $preview->id }}')">Generate
|
||||
Domain</x-forms.button>
|
||||
@endcan
|
||||
</form>
|
||||
@else
|
||||
@foreach (collect(json_decode($preview->docker_compose_domains)) as $serviceName => $service)
|
||||
@@ -122,82 +130,90 @@
|
||||
@else
|
||||
<form wire:submit="save_preview('{{ $preview->id }}')" class="flex items-end gap-2 pt-4">
|
||||
<x-forms.input label="Domain" helper="One domain per preview."
|
||||
id="application.previews.{{ $previewName }}.fqdn"></x-forms.input>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
<x-forms.button wire:click="generate_preview('{{ $preview->id }}')">Generate
|
||||
Domain</x-forms.button>
|
||||
id="application.previews.{{ $previewName }}.fqdn" canGate="update" :canResource="$application"></x-forms.input>
|
||||
@can('update', $application)
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
<x-forms.button wire:click="generate_preview('{{ $preview->id }}')">Generate
|
||||
Domain</x-forms.button>
|
||||
@endcan
|
||||
</form>
|
||||
@endif
|
||||
<div class="flex flex-col xl:flex-row xl:items-center gap-2 pt-6">
|
||||
<div class="flex-1"></div>
|
||||
<x-forms.button
|
||||
wire:click="force_deploy_without_cache({{ data_get($preview, 'pull_request_id') }})">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74" />
|
||||
<path
|
||||
d="M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6" />
|
||||
<path d="M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4" />
|
||||
<path d="M3 3l18 18" />
|
||||
</svg>
|
||||
Force deploy (without
|
||||
cache)
|
||||
</x-forms.button>
|
||||
<x-forms.button wire:click="deploy({{ data_get($preview, 'pull_request_id') }})">
|
||||
@if (data_get($preview, 'status') === 'exited')
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
@can('deploy', $application)
|
||||
<x-forms.button
|
||||
wire:click="force_deploy_without_cache({{ data_get($preview, 'pull_request_id') }})">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M7 4v16l13 -8z" />
|
||||
</svg>
|
||||
Deploy
|
||||
@else
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-orange-400"
|
||||
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path
|
||||
d="M10.09 4.01l.496 -.495a2 2 0 0 1 2.828 0l7.071 7.07a2 2 0 0 1 0 2.83l-7.07 7.07a2 2 0 0 1 -2.83 0l-7.07 -7.07a2 2 0 0 1 0 -2.83l3.535 -3.535h-3.988">
|
||||
</path>
|
||||
<path d="M7.05 11.038v-3.988"></path>
|
||||
</svg> Redeploy
|
||||
@endif
|
||||
</x-forms.button>
|
||||
@if (data_get($preview, 'status') !== 'exited')
|
||||
<x-modal-confirmation title="Confirm Preview Deployment Stopping?" buttonTitle="Stop"
|
||||
submitAction="stop({{ data_get($preview, 'pull_request_id') }})" :actions="[
|
||||
'This preview deployment will be stopped.',
|
||||
'If the preview deployment is currently in use data could be lost.',
|
||||
'All non-persistent data of this preview deployment (containers, networks, unused images) will be deleted (don\'t worry, no data is lost and you can start the preview deployment again).',
|
||||
]"
|
||||
:confirmWithText="false" :confirmWithPassword="false" step2ButtonText="Stop Preview Deployment">
|
||||
<x-slot:customButton>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error"
|
||||
d="M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74" />
|
||||
<path
|
||||
d="M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6" />
|
||||
<path d="M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4" />
|
||||
<path d="M3 3l18 18" />
|
||||
</svg>
|
||||
Force deploy (without
|
||||
cache)
|
||||
</x-forms.button>
|
||||
<x-forms.button wire:click="deploy({{ data_get($preview, 'pull_request_id') }})">
|
||||
@if (data_get($preview, 'status') === 'exited')
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning"
|
||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M7 4v16l13 -8z" />
|
||||
</svg>
|
||||
Deploy
|
||||
@else
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-orange-400"
|
||||
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path
|
||||
d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
|
||||
d="M10.09 4.01l.496 -.495a2 2 0 0 1 2.828 0l7.071 7.07a2 2 0 0 1 0 2.83l-7.07 7.07a2 2 0 0 1 -2.83 0l-7.07 -7.07a2 2 0 0 1 0 -2.83l3.535 -3.535h-3.988">
|
||||
</path>
|
||||
<path
|
||||
d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
|
||||
</path>
|
||||
</svg>
|
||||
Stop
|
||||
</x-slot:customButton>
|
||||
</x-modal-confirmation>
|
||||
<path d="M7.05 11.038v-3.988"></path>
|
||||
</svg> Redeploy
|
||||
@endif
|
||||
</x-forms.button>
|
||||
@endcan
|
||||
@if (data_get($preview, 'status') !== 'exited')
|
||||
@can('deploy', $application)
|
||||
<x-modal-confirmation title="Confirm Preview Deployment Stopping?" buttonTitle="Stop"
|
||||
submitAction="stop({{ data_get($preview, 'pull_request_id') }})" :actions="[
|
||||
'This preview deployment will be stopped.',
|
||||
'If the preview deployment is currently in use data could be lost.',
|
||||
'All non-persistent data of this preview deployment (containers, networks, unused images) will be deleted (don\'t worry, no data is lost and you can start the preview deployment again).',
|
||||
]"
|
||||
:confirmWithText="false" :confirmWithPassword="false" step2ButtonText="Stop Preview Deployment">
|
||||
<x-slot:customButton>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error"
|
||||
viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none"
|
||||
stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path
|
||||
d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
|
||||
</path>
|
||||
<path
|
||||
d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
|
||||
</path>
|
||||
</svg>
|
||||
Stop
|
||||
</x-slot:customButton>
|
||||
</x-modal-confirmation>
|
||||
@endcan
|
||||
@endif
|
||||
<x-modal-confirmation title="Confirm Preview Deployment Deletion?" buttonTitle="Delete"
|
||||
isErrorButton submitAction="delete({{ data_get($preview, 'pull_request_id') }})"
|
||||
:actions="[
|
||||
'All containers of this preview deployment will be stopped and permanently deleted.',
|
||||
]" confirmationText="{{ data_get($preview, 'fqdn') . '/' }}"
|
||||
confirmationLabel="Please confirm the execution of the actions by entering the Preview Deployment name below"
|
||||
shortConfirmationLabel="Preview Deployment Name" :confirmWithPassword="false" />
|
||||
@can('delete', $application)
|
||||
<x-modal-confirmation title="Confirm Preview Deployment Deletion?" buttonTitle="Delete"
|
||||
isErrorButton submitAction="delete({{ data_get($preview, 'pull_request_id') }})"
|
||||
:actions="[
|
||||
'All containers of this preview deployment will be stopped and permanently deleted.',
|
||||
]" confirmationText="{{ data_get($preview, 'fqdn') . '/' }}"
|
||||
confirmationLabel="Please confirm the execution of the actions by entering the Preview Deployment name below"
|
||||
shortConfirmationLabel="Preview Deployment Name" :confirmWithPassword="false" />
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<div x-init="$wire.loadImages">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Rollback</h2>
|
||||
<x-forms.button wire:click='loadImages(true)'>Reload Available Images</x-forms.button>
|
||||
@can('view', $application)
|
||||
<x-forms.button wire:click='loadImages(true)'>Reload Available Images</x-forms.button>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="pb-4 ">You can easily rollback to a previously built (local) images
|
||||
quickly.</div>
|
||||
@@ -26,16 +28,18 @@
|
||||
<div class="text-xs">{{ $date }}</div>
|
||||
</div>
|
||||
<div class="flex justify-end p-2">
|
||||
@if (data_get($image, 'is_current'))
|
||||
<x-forms.button disabled tooltip="This image is currently running.">
|
||||
Rollback
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.button class="dark:bg-coolgray-100"
|
||||
wire:click="rollbackImage('{{ data_get($image, 'tag') }}')">
|
||||
Rollback
|
||||
</x-forms.button>
|
||||
@endif
|
||||
@can('deploy', $application)
|
||||
@if (data_get($image, 'is_current'))
|
||||
<x-forms.button disabled tooltip="This image is currently running.">
|
||||
Rollback
|
||||
</x-forms.button>
|
||||
@else
|
||||
<x-forms.button class="dark:bg-coolgray-100"
|
||||
wire:click="rollbackImage('{{ data_get($image, 'tag') }}')">
|
||||
Rollback
|
||||
</x-forms.button>
|
||||
@endif
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<form wire:submit='submit' class="flex flex-col">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Source</h2>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
@can('update', $application)
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
@endcan
|
||||
<a target="_blank" class="hover:no-underline" href="{{ $application?->gitBranchLocation }}">
|
||||
<x-forms.button>
|
||||
Open Repository
|
||||
@@ -32,11 +34,11 @@
|
||||
</div>
|
||||
@endif
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input placeholder="coollabsio/coolify-example" id="gitRepository" label="Repository" />
|
||||
<x-forms.input placeholder="main" id="gitBranch" label="Branch" />
|
||||
<x-forms.input placeholder="coollabsio/coolify-example" id="gitRepository" label="Repository" canGate="update" :canResource="$application" />
|
||||
<x-forms.input placeholder="main" id="gitBranch" label="Branch" canGate="update" :canResource="$application" />
|
||||
</div>
|
||||
<div class="flex items-end gap-2">
|
||||
<x-forms.input placeholder="HEAD" id="gitCommitSha" placeholder="HEAD" label="Commit SHA" />
|
||||
<x-forms.input placeholder="HEAD" id="gitCommitSha" placeholder="HEAD" label="Commit SHA" canGate="update" :canResource="$application" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -46,45 +48,49 @@
|
||||
class="dark:text-warning">{{ $privateKeyName }}</span>
|
||||
</div>
|
||||
|
||||
<h4 class="py-2 ">Select another Private Key</h4>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@foreach ($privateKeys as $key)
|
||||
<x-forms.button wire:click="setPrivateKey('{{ $key->id }}')">{{ $key->name }}
|
||||
</x-forms.button>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="pt-4">
|
||||
<h3 class="pb-2">Change Git Source</h3>
|
||||
<div class="grid grid-cols-1 gap-2">
|
||||
@forelse ($sources as $source)
|
||||
<div wire:key="{{ $source->name }}">
|
||||
<x-modal-confirmation title="Change Git Source" :actions="['Change git source to ' . $source->name]" :buttonFullWidth="true"
|
||||
:isHighlightedButton="$application->source_id === $source->id" :disabled="$application->source_id === $source->id"
|
||||
submitAction="changeSource({{ $source->id }}, {{ $source->getMorphClass() }})"
|
||||
:confirmWithText="true" confirmationText="Change Git Source"
|
||||
confirmationLabel="Please confirm changing the git source by entering the text below"
|
||||
shortConfirmationLabel="Confirmation Text" :confirmWithPassword="false">
|
||||
<x-slot:customButton>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="box-title">
|
||||
{{ $source->name }}
|
||||
@if ($application->source_id === $source->id)
|
||||
<span class="text-xs">(current)</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="box-description">
|
||||
{{ $source->organization ?? 'Personal Account' }}
|
||||
</div>
|
||||
</div>
|
||||
</x-slot:customButton>
|
||||
</x-modal-confirmation>
|
||||
</div>
|
||||
@empty
|
||||
<div>No other sources found</div>
|
||||
@endforelse
|
||||
@can('update', $application)
|
||||
<h4 class="py-2 ">Select another Private Key</h4>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@foreach ($privateKeys as $key)
|
||||
<x-forms.button wire:click="setPrivateKey('{{ $key->id }}')">{{ $key->name }}
|
||||
</x-forms.button>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
@else
|
||||
@can('update', $application)
|
||||
<div class="pt-4">
|
||||
<h3 class="pb-2">Change Git Source</h3>
|
||||
<div class="grid grid-cols-1 gap-2">
|
||||
@forelse ($sources as $source)
|
||||
<div wire:key="{{ $source->name }}">
|
||||
<x-modal-confirmation title="Change Git Source" :actions="['Change git source to ' . $source->name]" :buttonFullWidth="true"
|
||||
:isHighlightedButton="$application->source_id === $source->id" :disabled="$application->source_id === $source->id"
|
||||
submitAction="changeSource({{ $source->id }}, {{ $source->getMorphClass() }})"
|
||||
:confirmWithText="true" confirmationText="Change Git Source"
|
||||
confirmationLabel="Please confirm changing the git source by entering the text below"
|
||||
shortConfirmationLabel="Confirmation Text" :confirmWithPassword="false">
|
||||
<x-slot:customButton>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="box-title">
|
||||
{{ $source->name }}
|
||||
@if ($application->source_id === $source->id)
|
||||
<span class="text-xs">(current)</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="box-description">
|
||||
{{ $source->organization ?? 'Personal Account' }}
|
||||
</div>
|
||||
</div>
|
||||
</x-slot:customButton>
|
||||
</x-modal-confirmation>
|
||||
</div>
|
||||
@empty
|
||||
<div>No other sources found</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 py-4">
|
||||
<div class="flex flex-col items-end gap-2 xl:flex-row">
|
||||
<x-forms.input id="swarmReplicas" label="Replicas" required />
|
||||
<x-forms.input id="swarmReplicas" label="Replicas" required canGate="update" :canResource="$application" />
|
||||
<x-forms.checkbox instantSave helper="If turned off, this resource will start on manager nodes too."
|
||||
id="isSwarmOnlyWorkerNodes" label="Only Start on Worker nodes" />
|
||||
id="isSwarmOnlyWorkerNodes" label="Only Start on Worker nodes" canGate="update" :canResource="$application" />
|
||||
</div>
|
||||
<x-forms.textarea id="swarmPlacementConstraints" rows="7" label="Custom Placement Constraints"
|
||||
placeholder="placement:
|
||||
constraints:
|
||||
- 'node.role == worker'" />
|
||||
- 'node.role == worker'" canGate="update" :canResource="$application" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user