Merge pull request #3310 from coollabsio/next

v4.0.0-beta.329
This commit is contained in:
Andras Bacsai 2024-09-04 14:35:34 +02:00 committed by GitHub
commit 3f34df251e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 26 additions and 13 deletions

View File

@ -99,6 +99,16 @@ public function updatedBaseDirectory()
}
}
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') {

View File

@ -43,6 +43,7 @@ public function saveEditedCompose()
{
$this->dispatch('info', 'Saving new docker compose...');
$this->dispatch('saveCompose', $this->service->docker_compose_raw);
$this->dispatch('refreshStorages');
}
public function instantSave()

View File

@ -24,6 +24,7 @@ class All extends Component
protected $listeners = [
'saveKey' => 'submit',
'refreshEnvs',
'environmentVariableDeleted' => 'refreshEnvs',
];
@ -61,7 +62,7 @@ public function sortEnvironmentVariables()
$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') {

View File

@ -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(':');

View File

@ -7,7 +7,7 @@
// 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'),

View File

@ -1,3 +1,3 @@
<?php
return '4.0.0-beta.328';
return '4.0.0-beta.329';

View File

@ -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

View File

@ -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"
}
}
}