refactor: Improve pre and post deployment command inputs

This commit is contained in:
Andras Bacsai 2024-06-06 15:11:17 +02:00
parent 7f052163e3
commit 7cb08849de

View File

@ -265,20 +265,24 @@ class="underline" href="https://coolify.io/docs/knowledge-base/docker/registry"
<h3 class="pt-8">Pre/Post Deployment Commands</h3> <h3 class="pt-8">Pre/Post Deployment Commands</h3>
<div class="flex flex-col gap-2 xl:flex-row"> <div class="flex flex-col gap-2 xl:flex-row">
<x-forms.input x-bind:disabled="initLoadingCompose" id="application.pre_deployment_command" <x-forms.input x-bind:disabled="initLoadingCompose" placeholder="php artisan migrate"
label="Pre-deployment Command" id="application.pre_deployment_command" label="Pre-deployment "
helper="An optional script or command to execute in the existing container before the deployment begins." /> 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." />
<x-forms.input x-bind:disabled="initLoadingCompose" id="application.pre_deployment_command_container" @if ($application->build_pack === 'dockercompose')
label="Container Name" <x-forms.input x-bind:disabled="initLoadingCompose"
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." /> helper="The name of the container to execute within. You can leave it blank if your application only has one container." />
@endif
</div> </div>
<div class="flex flex-col gap-2 xl:flex-row"> <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="initLoadingCompose" placeholder="php artisan migrate"
id="application.post_deployment_command" label="Post-deployment Command" 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." /> 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." />
<x-forms.input x-bind:disabled="initLoadingCompose" id="application.post_deployment_command_container" @if ($application->build_pack === 'dockercompose')
label="Container Name" <x-forms.input x-bind:disabled="initLoadingCompose"
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." /> helper="The name of the container to execute within. You can leave it blank if your application only has one container." />
@endif
</div> </div>
</div> </div>
</form> </form>