Skip to content

Commit a3a61db

Browse files
committed
refactor: Update Docker Compose location handling in PublicGitRepository
1 parent 5799e6d commit a3a61db

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

app/Livewire/Project/New/PublicGitRepository.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ public function updatedBaseDirectory()
9999
}
100100
}
101101

102+
public function updatedDockerComposeLocation()
103+
{
104+
if ($this->docker_compose_location) {
105+
$this->docker_compose_location = rtrim($this->docker_compose_location, '/');
106+
if (! str($this->docker_compose_location)->startsWith('/')) {
107+
$this->docker_compose_location = '/'.$this->docker_compose_location;
108+
}
109+
}
110+
}
111+
102112
public function updatedBuildPack()
103113
{
104114
if ($this->build_pack === 'nixpacks') {

resources/views/livewire/project/new/public-git-repository.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<form class="flex flex-col gap-2" wire:submit='loadBranch'>
55
<div class="flex flex-col gap-2">
66
<div class="flex flex-col gap-2">
7-
<div class="flex items-end gap-2">
7+
<div class="flex gap-2 items-end">
88
<x-forms.input required id="repository_url" label="Repository URL (https://)"
99
helper="{!! __('repository.url') !!}" />
1010
<x-forms.button type="submit">
@@ -47,7 +47,7 @@
4747
@if ($build_pack === 'dockercompose')
4848
<x-forms.input placeholder="/" wire:model.blur="base_directory" label="Base Directory"
4949
helper="Directory to use as root. Useful for monorepos." />
50-
<x-forms.input placeholder="/docker-compose.yaml" id="docker_compose_location"
50+
<x-forms.input placeholder="/docker-compose.yaml" wire:model.blur="docker_compose_location"
5151
label="Docker Compose Location"
5252
helper="It is calculated together with the Base Directory:<br><span class='dark:text-warning'>{{ Str::start($base_directory . $docker_compose_location, '/') }}</span>" />
5353
Compose file location in your repository:<span

0 commit comments

Comments
 (0)