mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 08:04:19 +02:00
commit
3f34df251e
@ -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()
|
public function updatedBuildPack()
|
||||||
{
|
{
|
||||||
if ($this->build_pack === 'nixpacks') {
|
if ($this->build_pack === 'nixpacks') {
|
||||||
|
@ -43,6 +43,7 @@ public function saveEditedCompose()
|
|||||||
{
|
{
|
||||||
$this->dispatch('info', 'Saving new docker compose...');
|
$this->dispatch('info', 'Saving new docker compose...');
|
||||||
$this->dispatch('saveCompose', $this->service->docker_compose_raw);
|
$this->dispatch('saveCompose', $this->service->docker_compose_raw);
|
||||||
|
$this->dispatch('refreshStorages');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function instantSave()
|
public function instantSave()
|
||||||
|
@ -24,6 +24,7 @@ class All extends Component
|
|||||||
|
|
||||||
protected $listeners = [
|
protected $listeners = [
|
||||||
'saveKey' => 'submit',
|
'saveKey' => 'submit',
|
||||||
|
'refreshEnvs',
|
||||||
'environmentVariableDeleted' => 'refreshEnvs',
|
'environmentVariableDeleted' => 'refreshEnvs',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ public function sortEnvironmentVariables()
|
|||||||
$sortBy = data_get($this->resource, 'settings.is_env_sorting_enabled') ? 'key' : 'order';
|
$sortBy = data_get($this->resource, 'settings.is_env_sorting_enabled') ? 'key' : 'order';
|
||||||
|
|
||||||
$sortFunction = function ($variables) use ($sortBy) {
|
$sortFunction = function ($variables) use ($sortBy) {
|
||||||
if (!$variables) {
|
if (! $variables) {
|
||||||
return $variables;
|
return $variables;
|
||||||
}
|
}
|
||||||
if ($sortBy === 'key') {
|
if ($sortBy === 'key') {
|
||||||
|
@ -136,4 +136,4 @@ public function delete()
|
|||||||
return handleError($e);
|
return handleError($e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3092,10 +3092,9 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
|
|||||||
$topLevel->get('volumes')->put($name, [
|
$topLevel->get('volumes')->put($name, [
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
LocalPersistentVolume::updateOrCreate(
|
LocalPersistentVolume::updateOrCreate(
|
||||||
[
|
[
|
||||||
'mount_path' => $target,
|
'name' => $name,
|
||||||
'resource_id' => $originalResource->id,
|
'resource_id' => $originalResource->id,
|
||||||
'resource_type' => get_class($originalResource),
|
'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
|
// convert environment variables to one format
|
||||||
ray($environment);
|
|
||||||
$environment = convertComposeEnvironmentToArray($environment);
|
$environment = convertComposeEnvironmentToArray($environment);
|
||||||
|
|
||||||
// Add Coolify defined environments
|
// Add Coolify defined environments
|
||||||
@ -3333,7 +3331,10 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
|
|||||||
foreach ($normalEnvironments as $key => $value) {
|
foreach ($normalEnvironments as $key => $value) {
|
||||||
$key = str($key);
|
$key = str($key);
|
||||||
$value = str($value);
|
$value = str($value);
|
||||||
if ($value->startsWith('$')) {
|
if ($value->startsWith('$') || $value->contains('${')) {
|
||||||
|
if ($value->contains('${')) {
|
||||||
|
$value = $value->after('${')->before('}');
|
||||||
|
}
|
||||||
$value = str(replaceVariables(str($value)));
|
$value = str(replaceVariables(str($value)));
|
||||||
if ($value->contains(':-')) {
|
if ($value->contains(':-')) {
|
||||||
$key = $value->before(':');
|
$key = $value->before(':');
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
// The release version of your application
|
// The release version of your application
|
||||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
// 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
|
// When left empty or `null` the Laravel environment will be used
|
||||||
'environment' => config('app.env'),
|
'environment' => config('app.env'),
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?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'>
|
<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 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://)"
|
<x-forms.input required id="repository_url" label="Repository URL (https://)"
|
||||||
helper="{!! __('repository.url') !!}" />
|
helper="{!! __('repository.url') !!}" />
|
||||||
<x-forms.button type="submit">
|
<x-forms.button type="submit">
|
||||||
@ -47,7 +47,7 @@
|
|||||||
@if ($build_pack === 'dockercompose')
|
@if ($build_pack === 'dockercompose')
|
||||||
<x-forms.input placeholder="/" wire:model.blur="base_directory" label="Base Directory"
|
<x-forms.input placeholder="/" wire:model.blur="base_directory" label="Base Directory"
|
||||||
helper="Directory to use as root. Useful for monorepos." />
|
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"
|
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>" />
|
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
|
Compose file location in your repository:<span
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"coolify": {
|
"coolify": {
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.328"
|
"version": "4.0.0-beta.329"
|
||||||
},
|
},
|
||||||
"nightly": {
|
"nightly": {
|
||||||
"version": "4.0.0-beta.329"
|
"version": "4.0.0-beta.330"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user