@@ -99,6 +99,16 @@ class PublicGitRepository extends Component
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function updatedDockerComposeLocation()
 | 
			
		||||
    {
 | 
			
		||||
        if ($this->docker_compose_location) {
 | 
			
		||||
            $this->docker_compose_location = rtrim($this->docker_compose_location, '/');
 | 
			
		||||
            if (! str($this->docker_compose_location)->startsWith('/')) {
 | 
			
		||||
                $this->docker_compose_location = '/'.$this->docker_compose_location;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function updatedBuildPack()
 | 
			
		||||
    {
 | 
			
		||||
        if ($this->build_pack === 'nixpacks') {
 | 
			
		||||
 
 | 
			
		||||
@@ -43,6 +43,7 @@ class EditCompose extends Component
 | 
			
		||||
    {
 | 
			
		||||
        $this->dispatch('info', 'Saving new docker compose...');
 | 
			
		||||
        $this->dispatch('saveCompose', $this->service->docker_compose_raw);
 | 
			
		||||
        $this->dispatch('refreshStorages');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function instantSave()
 | 
			
		||||
 
 | 
			
		||||
@@ -24,6 +24,7 @@ class All extends Component
 | 
			
		||||
 | 
			
		||||
    protected $listeners = [
 | 
			
		||||
        'saveKey' => 'submit',
 | 
			
		||||
        'refreshEnvs',
 | 
			
		||||
        'environmentVariableDeleted' => 'refreshEnvs',
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
@@ -61,7 +62,7 @@ class All extends Component
 | 
			
		||||
        $sortBy = data_get($this->resource, 'settings.is_env_sorting_enabled') ? 'key' : 'order';
 | 
			
		||||
 | 
			
		||||
        $sortFunction = function ($variables) use ($sortBy) {
 | 
			
		||||
            if (!$variables) {
 | 
			
		||||
            if (! $variables) {
 | 
			
		||||
                return $variables;
 | 
			
		||||
            }
 | 
			
		||||
            if ($sortBy === 'key') {
 | 
			
		||||
 
 | 
			
		||||
@@ -136,4 +136,4 @@ class Show extends Component
 | 
			
		||||
            return handleError($e);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -3092,10 +3092,9 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
 | 
			
		||||
                    $topLevel->get('volumes')->put($name, [
 | 
			
		||||
                        'name' => $name,
 | 
			
		||||
                    ]);
 | 
			
		||||
 | 
			
		||||
                    LocalPersistentVolume::updateOrCreate(
 | 
			
		||||
                        [
 | 
			
		||||
                            'mount_path' => $target,
 | 
			
		||||
                            'name' => $name,
 | 
			
		||||
                            'resource_id' => $originalResource->id,
 | 
			
		||||
                            'resource_type' => get_class($originalResource),
 | 
			
		||||
                        ],
 | 
			
		||||
@@ -3206,7 +3205,6 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        // convert environment variables to one format
 | 
			
		||||
        ray($environment);
 | 
			
		||||
        $environment = convertComposeEnvironmentToArray($environment);
 | 
			
		||||
 | 
			
		||||
        // Add Coolify defined environments
 | 
			
		||||
@@ -3333,7 +3331,10 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
 | 
			
		||||
        foreach ($normalEnvironments as $key => $value) {
 | 
			
		||||
            $key = str($key);
 | 
			
		||||
            $value = str($value);
 | 
			
		||||
            if ($value->startsWith('$')) {
 | 
			
		||||
            if ($value->startsWith('$') || $value->contains('${')) {
 | 
			
		||||
                if ($value->contains('${')) {
 | 
			
		||||
                    $value = $value->after('${')->before('}');
 | 
			
		||||
                }
 | 
			
		||||
                $value = str(replaceVariables(str($value)));
 | 
			
		||||
                if ($value->contains(':-')) {
 | 
			
		||||
                    $key = $value->before(':');
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ return [
 | 
			
		||||
 | 
			
		||||
    // The release version of your application
 | 
			
		||||
    // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
 | 
			
		||||
    'release' => '4.0.0-beta.328',
 | 
			
		||||
    'release' => '4.0.0-beta.329',
 | 
			
		||||
    // When left empty or `null` the Laravel environment will be used
 | 
			
		||||
    'environment' => config('app.env'),
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,3 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
return '4.0.0-beta.328';
 | 
			
		||||
return '4.0.0-beta.329';
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
    <form class="flex flex-col gap-2" wire:submit='loadBranch'>
 | 
			
		||||
        <div class="flex flex-col gap-2">
 | 
			
		||||
            <div class="flex flex-col gap-2">
 | 
			
		||||
                <div class="flex items-end gap-2">
 | 
			
		||||
                <div class="flex gap-2 items-end">
 | 
			
		||||
                    <x-forms.input required id="repository_url" label="Repository URL (https://)"
 | 
			
		||||
                        helper="{!! __('repository.url') !!}" />
 | 
			
		||||
                    <x-forms.button type="submit">
 | 
			
		||||
@@ -47,7 +47,7 @@
 | 
			
		||||
                        @if ($build_pack === 'dockercompose')
 | 
			
		||||
                            <x-forms.input placeholder="/" wire:model.blur="base_directory" label="Base Directory"
 | 
			
		||||
                                helper="Directory to use as root. Useful for monorepos." />
 | 
			
		||||
                            <x-forms.input placeholder="/docker-compose.yaml" id="docker_compose_location"
 | 
			
		||||
                            <x-forms.input placeholder="/docker-compose.yaml" wire:model.blur="docker_compose_location"
 | 
			
		||||
                                label="Docker Compose Location"
 | 
			
		||||
                                helper="It is calculated together with the Base Directory:<br><span class='dark:text-warning'>{{ Str::start($base_directory . $docker_compose_location, '/') }}</span>" />
 | 
			
		||||
                            Compose file location in your repository:<span
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
{
 | 
			
		||||
    "coolify": {
 | 
			
		||||
        "v4": {
 | 
			
		||||
            "version": "4.0.0-beta.328"
 | 
			
		||||
            "version": "4.0.0-beta.329"
 | 
			
		||||
        },
 | 
			
		||||
        "nightly": {
 | 
			
		||||
            "version": "4.0.0-beta.329"
 | 
			
		||||
            "version": "4.0.0-beta.330"
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user