Skip to content

Commit 9497f12

Browse files
committed
revert: advanced dropdown
1 parent 6feb439 commit 9497f12

File tree

1 file changed

+88
-114
lines changed

1 file changed

+88
-114
lines changed

resources/views/livewire/project/application/general.blade.php

Lines changed: 88 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -149,124 +149,99 @@ class="underline" href="https://coolify.io/docs/knowledge-base/docker/registry"
149149
Specific Docs</a>
150150
</div>
151151
@endif
152+
152153
@endif
153-
<div x-data="{
154-
activeAccordion: '',
155-
setActiveAccordion(id) {
156-
this.activeAccordion = (this.activeAccordion == id) ? '' : id
157-
}
158-
}"
159-
class="relative w-full mx-auto mt-4 overflow-hidden text-sm font-normal">
160-
<div x-data="{ id: $id('accordion') }" class="cursor-pointer">
161-
<button @click="setActiveAccordion(id)"
162-
class="flex items-center justify-between w-full p-1 text-left select-none hover:dark:text-white hover:bg-white/5"
163-
type="button">
164-
<h4>Advanced</h4>
165-
<svg class="w-4 h-4 duration-200 ease-out"
166-
:class="{ 'rotate-180': activeAccordion == id }" viewBox="0 0 24 24"
167-
xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor"
168-
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
169-
<polyline points="6 9 12 15 18 9"></polyline>
170-
</svg>
171-
</button>
172-
<div x-show="activeAccordion==id" x-collapse x-cloak class="px-2">
173-
<div class="flex flex-col gap-2 pt-6 pb-10">
174-
@if ($application->build_pack === 'dockercompose')
175-
<div class="flex flex-col gap-2" x-init="$wire.dispatch('loadCompose', true)">
176-
<div class="flex gap-2">
177-
<x-forms.input x-bind:disabled="initLoadingCompose" placeholder="/"
178-
id="application.base_directory" label="Base Directory"
179-
helper="Directory to use as root. Useful for monorepos." />
180-
<x-forms.input x-bind:disabled="initLoadingCompose"
181-
placeholder="/docker-compose.yaml"
182-
id="application.docker_compose_location"
183-
label="Docker Compose Location"
184-
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>" />
185-
</div>
186-
<div class="w-96">
187-
<x-forms.checkbox instantSave
188-
id="application.settings.is_preserve_repository_enabled"
189-
label="Preserve Repository During Deployment"
190-
helper="Git repository (based on the base directory settings) will be copied to the deployment directory." />
191-
</div>
192-
<div class="pt-4">The following commands are for advanced use cases. Only
193-
modify them if you
194-
know what are
195-
you doing.</div>
196-
<div class="flex gap-2">
197-
<x-forms.input placeholder="docker compose build"
198-
x-bind:disabled="initLoadingCompose"
199-
id="application.docker_compose_custom_build_command"
200-
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>"
201-
label="Custom Build Command" />
202-
<x-forms.input placeholder="docker compose up -d"
203-
x-bind:disabled="initLoadingCompose"
204-
id="application.docker_compose_custom_start_command"
205-
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>"
206-
label="Custom Start Command" />
207-
</div>
208-
</div>
209-
@else
210-
<div class="flex flex-col gap-2 xl:flex-row">
211-
<x-forms.input placeholder="/" id="application.base_directory"
212-
label="Base Directory"
213-
helper="Directory to use as root. Useful for monorepos." />
214-
@if ($application->build_pack === 'dockerfile' && !$application->dockerfile)
215-
<x-forms.input placeholder="/Dockerfile"
216-
id="application.dockerfile_location" label="Dockerfile Location"
217-
helper="It is calculated together with the Base Directory:<br><span class='dark:text-warning'>{{ Str::start($application->base_directory . $application->dockerfile_location, '/') }}</span>" />
218-
@endif
154+
<div class="flex flex-col gap-2 pt-6 pb-10">
155+
@if ($application->build_pack === 'dockercompose')
156+
<div class="flex flex-col gap-2" x-init="$wire.dispatch('loadCompose', true)">
157+
<div class="flex gap-2">
158+
<x-forms.input x-bind:disabled="initLoadingCompose" placeholder="/"
159+
id="application.base_directory" label="Base Directory"
160+
helper="Directory to use as root. Useful for monorepos." />
161+
<x-forms.input x-bind:disabled="initLoadingCompose"
162+
placeholder="/docker-compose.yaml" id="application.docker_compose_location"
163+
label="Docker Compose Location"
164+
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>" />
165+
</div>
166+
<div class="w-96">
167+
<x-forms.checkbox instantSave
168+
id="application.settings.is_preserve_repository_enabled"
169+
label="Preserve Repository During Deployment"
170+
helper="Git repository (based on the base directory settings) will be copied to the deployment directory." />
171+
</div>
172+
<div class="pt-4">The following commands are for advanced use cases.
173+
Only
174+
modify them if you
175+
know what are
176+
you doing.</div>
177+
<div class="flex gap-2">
178+
<x-forms.input placeholder="docker compose build"
179+
x-bind:disabled="initLoadingCompose"
180+
id="application.docker_compose_custom_build_command"
181+
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>"
182+
label="Custom Build Command" />
183+
<x-forms.input placeholder="docker compose up -d"
184+
x-bind:disabled="initLoadingCompose"
185+
id="application.docker_compose_custom_start_command"
186+
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>"
187+
label="Custom Start Command" />
188+
</div>
189+
</div>
190+
@else
191+
<div class="flex flex-col gap-2 xl:flex-row">
192+
<x-forms.input placeholder="/" id="application.base_directory" label="Base Directory"
193+
helper="Directory to use as root. Useful for monorepos." />
194+
@if ($application->build_pack === 'dockerfile' && !$application->dockerfile)
195+
<x-forms.input placeholder="/Dockerfile" id="application.dockerfile_location"
196+
label="Dockerfile Location"
197+
helper="It is calculated together with the Base Directory:<br><span class='dark:text-warning'>{{ Str::start($application->base_directory . $application->dockerfile_location, '/') }}</span>" />
198+
@endif
219199

220-
@if ($application->build_pack === 'dockerfile')
221-
<x-forms.input id="application.dockerfile_target_build"
222-
label="Docker Build Stage Target"
223-
helper="Useful if you have multi-staged dockerfile." />
224-
@endif
225-
@if ($application->could_set_build_commands())
226-
@if ($application->settings->is_static)
227-
<x-forms.input placeholder="/dist"
228-
id="application.publish_directory" label="Publish Directory"
229-
required />
230-
@else
231-
<x-forms.input placeholder="/" id="application.publish_directory"
232-
label="Publish Directory" />
233-
@endif
234-
@endif
200+
@if ($application->build_pack === 'dockerfile')
201+
<x-forms.input id="application.dockerfile_target_build"
202+
label="Docker Build Stage Target"
203+
helper="Useful if you have multi-staged dockerfile." />
204+
@endif
205+
@if ($application->could_set_build_commands())
206+
@if ($application->settings->is_static)
207+
<x-forms.input placeholder="/dist" id="application.publish_directory"
208+
label="Publish Directory" required />
209+
@else
210+
<x-forms.input placeholder="/" id="application.publish_directory"
211+
label="Publish Directory" />
212+
@endif
213+
@endif
235214

236-
</div>
237-
@if ($this->application->is_github_based() && !$this->application->is_public_repository())
238-
<div class="pb-4">
239-
<x-forms.textarea
240-
helper="Gitignore-style rules to filter Git based webhook deployments."
241-
placeholder="src/pages/**" id="application.watch_paths"
242-
label="Watch Paths" />
243-
</div>
244-
@endif
245-
<x-forms.input
246-
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>"
247-
placeholder="--cap-add SYS_ADMIN --device=/dev/fuse --security-opt apparmor:unconfined --ulimit nofile=1024:1024 --tmpfs /run:rw,noexec,nosuid,size=65536k"
248-
id="application.custom_docker_run_options"
249-
label="Custom Docker Options" />
215+
</div>
216+
@if ($this->application->is_github_based() && !$this->application->is_public_repository())
217+
<div class="pb-4">
218+
<x-forms.textarea
219+
helper="Gitignore-style rules to filter Git based webhook deployments."
220+
placeholder="src/pages/**" id="application.watch_paths"
221+
label="Watch Paths" />
222+
</div>
223+
@endif
224+
<x-forms.input
225+
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>"
226+
placeholder="--cap-add SYS_ADMIN --device=/dev/fuse --security-opt apparmor:unconfined --ulimit nofile=1024:1024 --tmpfs /run:rw,noexec,nosuid,size=65536k"
227+
id="application.custom_docker_run_options" label="Custom Docker Options" />
250228

251-
@if ($application->build_pack !== 'dockercompose')
252-
<div class="pt-2 w-96">
253-
<x-forms.checkbox
254-
helper="Use a build server to build your application. You can configure your build server in the Server settings. This is experimental. For more info, check the <a href='https://coolify.io/docs/knowledge-base/server/build-server' class='underline' target='_blank'>documentation</a>."
255-
instantSave id="application.settings.is_build_server_enabled"
256-
label="Use a Build Server? (experimental)" />
257-
</div>
258-
@endif
259-
@if ($application->could_set_build_commands())
260-
<div class="w-96">
261-
<x-forms.checkbox instantSave id="application.settings.is_static"
262-
label="Is it a static site?"
263-
helper="If your application is a static site or the final build assets should be served as a static site, enable this." />
264-
</div>
265-
@endif
266-
@endif
229+
@if ($application->build_pack !== 'dockercompose')
230+
<div class="pt-2 w-96">
231+
<x-forms.checkbox
232+
helper="Use a build server to build your application. You can configure your build server in the Server settings. This is experimental. For more info, check the <a href='https://coolify.io/docs/knowledge-base/server/build-server' class='underline' target='_blank'>documentation</a>."
233+
instantSave id="application.settings.is_build_server_enabled"
234+
label="Use a Build Server? (experimental)" />
267235
</div>
268-
</div>
269-
</div>
236+
@endif
237+
@if ($application->could_set_build_commands())
238+
<div class="w-96">
239+
<x-forms.checkbox instantSave id="application.settings.is_static"
240+
label="Is it a static site?"
241+
helper="If your application is a static site or the final build assets should be served as a static site, enable this." />
242+
</div>
243+
@endif
244+
@endif
270245
</div>
271246
@endif
272247
</div>
@@ -292,7 +267,6 @@ class="flex items-center justify-between w-full p-1 text-left select-none hover:
292267
id="application.settings.is_container_label_readonly_enabled" instantSave></x-forms.checkbox>
293268
</div>
294269
@endif
295-
296270
@if ($application->dockerfile)
297271
<x-forms.textarea label="Dockerfile" id="application.dockerfile" monacoEditorLanguage="dockerfile"
298272
useMonacoEditor rows="6"> </x-forms.textarea>

0 commit comments

Comments
 (0)