Compare commits

...

20 Commits

Author SHA1 Message Date
Andras Bacsai
3a1e5f7f0c Merge pull request #2675 from coollabsio/next
v4.0.0-beta.304
2024-06-24 23:49:16 +02:00
Andras Bacsai
8d85976ac0 revert savecomposeconfig 2024-06-24 23:47:55 +02:00
Andras Bacsai
fe7eaa594f Merge pull request #2672 from coollabsio/next
v4.0.0-beta.303
2024-06-24 22:47:53 +02:00
Andras Bacsai
5500a1edb3 refactor: Remove commented out code in Service model's saveComposeConfigs method 2024-06-24 22:46:19 +02:00
Andras Bacsai
eb27e34972 chore: Update version to 4.0.0-beta.303 2024-06-24 22:46:16 +02:00
Andras Bacsai
8335c299b8 Merge pull request #2670 from coollabsio/next
fix fix fix
2024-06-24 21:00:03 +02:00
Andras Bacsai
feadc60b14 refactor: Improve handling of default environment in Service model's saveComposeConfigs method 2024-06-24 20:59:24 +02:00
Andras Bacsai
b59799dc2b refactor: Add default environment to Service model's saveComposeConfigs method 2024-06-24 20:58:54 +02:00
Andras Bacsai
f0b2f6eb00 Merge pull request #2669 from coollabsio/next
v4.0.0-beta.302
2024-06-24 20:56:48 +02:00
Andras Bacsai
c3fb126a0a refactor: Update Service model's saveComposeConfigs method 2024-06-24 20:55:12 +02:00
Andras Bacsai
f6708f6e47 chore: Update version to 4.0.0-beta.302 2024-06-24 20:54:53 +02:00
Andras Bacsai
d48b5a9079 Merge pull request #2664 from coollabsio/next
Refactor default_environment method to handle projects with 0 environ…
2024-06-24 18:42:21 +02:00
Andras Bacsai
99354f0d7d Refactor default_environment method to handle projects with 0 environments 2024-06-24 18:41:44 +02:00
Andras Bacsai
0fa8552aa3 Merge pull request #2663 from coollabsio/next
v4.0.0-beta.301
2024-06-24 18:35:18 +02:00
Andras Bacsai
4869c388b2 Merge pull request #2659 from kubatron117/cs-lang
CS localization
2024-06-24 18:34:54 +02:00
Andras Bacsai
2adade0927 Merge pull request #2661 from ari-party/main
Small CSS change
2024-06-24 18:34:28 +02:00
Andras Bacsai
87b7337d9e fix: projects with 0 envs 2024-06-24 18:33:01 +02:00
Andras Bacsai
351c9c1ad3 chore: Update version to 4.0.0-beta.301 2024-06-24 18:31:15 +02:00
kubatron 117
7759fe2cdf Add czech localization 2024-06-24 17:24:08 +02:00
Astrid
5d2651afc1 Add margin top to button 2024-06-24 17:20:56 +02:00
10 changed files with 75 additions and 28 deletions

View File

@@ -81,7 +81,6 @@ class StackForm extends Component
return handleError($e, $this);
} finally {
if (is_null($this->service->config_hash)) {
ray('asdf');
$this->service->isConfigurationChanged(true);
} else {
$this->dispatch('configurationChanged');

View File

@@ -116,10 +116,14 @@ class Project extends BaseModel
public function default_environment()
{
$default = $this->environments()->where('name', 'production')->first();
if (! $default) {
$default = $this->environments()->get()->sortBy('created_at')->first();
if ($default) {
return $default->name;
}
$default = $this->environments()->get();
if ($default->count() > 0) {
return $default->sortBy('created_at')->first()->name;
}
return $default;
return null;
}
}

View File

@@ -840,22 +840,26 @@ class Service extends BaseModel
$json = Yaml::parse($this->docker_compose);
$envs_from_coolify = $this->environment_variables()->get();
foreach ($json['services'] as $service => $config) {
$envs = collect($config['environment']);
$envs->push("COOLIFY_CONTAINER_NAME=$service-{$this->uuid}");
foreach ($envs_from_coolify as $env) {
$envs = $envs->map(function ($value) use ($env) {
if (str($value)->startsWith($env->key)) {
return "{$env->key}={$env->real_value}";
}
return $value;
});
}
$envs = $envs->unique();
data_set($json, "services.$service.environment", $envs->toArray());
}
// foreach ($json['services'] as $service => $config) {
// if (data_get($config, 'environment') === null) {
// data_set($json, "services.$service.environment", []);
// $envs = collect([]);
// } else {
// $envs = collect($config['environment']);
// }
// // $envs->put('COOLIFY_CONTAINER_NAME', "$service-{$this->uuid}");
// foreach ($envs_from_coolify as $env) {
// $envs = $envs->map(function ($value) use ($env) {
// if (str($value)->startsWith($env->key)) {
// return "{$env->key}={$env->real_value}";
// }
// return $value;
// });
// }
// $envs = $envs->unique();
// data_set($json, "services.$service.environment", $envs->toArray());
// }
$this->docker_compose = Yaml::dump($json, 10, 2, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK);
$docker_compose_base64 = base64_encode($this->docker_compose);

View File

@@ -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.300',
'release' => '4.0.0-beta.304',
// 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.300';
return '4.0.0-beta.304';

30
lang/cs.json Normal file
View File

@@ -0,0 +1,30 @@
{
"auth.login": "Přihlásit se",
"auth.login.azure": "Přihlásit se pomocí Microsoftu",
"auth.login.bitbucket": "Přihlásit se pomocí Bitbucketu",
"auth.login.github": "Přihlásit se pomocí GitHubu",
"auth.login.gitlab": "Přihlásit se pomocí Gitlabu",
"auth.login.google": "Přihlásit se pomocí Google",
"auth.already_registered": "Již jste registrováni?",
"auth.confirm_password": "Potvrďte heslo",
"auth.forgot_password": "Zapomněli jste heslo",
"auth.forgot_password_send_email": "Poslat e-mail pro resetování hesla",
"auth.register_now": "Registrovat se",
"auth.logout": "Odhlásit se",
"auth.register": "Registrovat se",
"auth.registration_disabled": "Registrace je zakázána. Kontaktujte prosím administrátora.",
"auth.reset_password": "Obnovit heslo",
"auth.failed": "Tyto údaje neodpovídají našim záznamům.",
"auth.failed.callback": "Nepodařilo se zpracovat zpětné volání od poskytovatele přihlášení.",
"auth.failed.password": "Zadané heslo je nesprávné.",
"auth.failed.email": "Nemůžeme najít uživatele s touto e-mailovou adresou.",
"auth.throttle": "Příliš mnoho pokusů o přihlášení. Zkuste to prosím znovu za :seconds sekund.",
"input.name": "Jméno",
"input.email": "E-mail",
"input.password": "Heslo",
"input.password.again": "Heslo znovu",
"input.code": "Jednorázový kód",
"input.recovery_code": "Obnovovací kód",
"button.save": "Uložit",
"repository.url": "<span class='text-helper'>Příklady</span><br>Pro veřejné repozitáře, použijte <span class='text-helper'>https://...</span>.<br>Pro soukromé repozitáře, použijte <span class='text-helper'>git@...</span>.<br><br>https://github.com/coollabsio/coolify-examples <span class='text-helper'>main</span> branch bude zvolena<br>https://github.com/coollabsio/coolify-examples/tree/nodejs-fastify <span class='text-helper'>nodejs-fastify</span> branch bude vybrána.<br>https://gitea.com/sedlav/expressjs.git <span class='text-helper'>main</span> branch vybrána.<br>https://gitlab.com/andrasbacsai/nodejs-example.git <span class='text-helper'>main</span> branch bude vybrána."
}

View File

@@ -23,7 +23,7 @@
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
@foreach ($projects as $project)
<div class="gap-2 border border-transparent cursor-pointer box group"
onclick="window.location.href = '{{ route('project.resource.index', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => $project->default_environment()->name]) }}'">
onclick="gotoProject('{{ $project->uuid }}','{{ $project->default_environment() }}')">
<div class="flex flex-1 mx-6">
<div class="flex flex-col justify-center flex-1">
<div class="box-title">{{ $project->name }}</div>
@@ -160,7 +160,10 @@
@endif
<script>
function gotoProject(uuid, environment = 'production') {
function gotoProject(uuid, environment) {
if (!environment) {
window.location.href = '/project/' + uuid;
}
window.location.href = '/project/' + uuid + '/' + environment;
}
</script>

View File

@@ -12,12 +12,12 @@
<div class="grid gap-2 lg:grid-cols-2">
@forelse ($projects as $project)
<div class="box group" x-data x-on:click="goto('{{ $project->uuid }}')">
<a class="flex flex-col justify-center flex-1 mx-6"
href="{{ route('project.resource.index', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => $project->default_environment()->name]) }}">
<div class="flex flex-col justify-center flex-1 mx-6"
onclick="gotoProject('{{ $project->uuid }}','{{ $project->default_environment() }}')">
<div class="box-title">{{ $project->name }}</div>
<div class="box-description ">
{{ $project->description }}</div>
</a>
</div>
<div class="flex items-center justify-center gap-2 pt-4 pb-2 mr-4 text-xs lg:py-0 lg:justify-normal">
<a class="mx-4 font-bold hover:underline"
href="{{ route('project.edit', ['project_uuid' => data_get($project, 'uuid')]) }}">
@@ -36,5 +36,12 @@
function goto(uuid) {
window.location.href = '/project/' + uuid;
}
function gotoProject(uuid, environment) {
if (!environment) {
window.location.href = '/project/' + uuid;
}
window.location.href = '/project/' + uuid + '/' + environment;
}
</script>
</div>

View File

@@ -26,7 +26,7 @@
@else
To configure automatic backup for your Coolify instance, you first need to add as a database resource
into Coolify.
<x-forms.button wire:click="add_coolify_database">Add Database</x-forms.button>
<x-forms.button class="mt-2" wire:click="add_coolify_database">Add Database</x-forms.button>
@endif
</div>
<div class="py-4">

View File

@@ -1,7 +1,7 @@
{
"coolify": {
"v4": {
"version": "4.0.0-beta.300"
"version": "4.0.0-beta.304"
}
}
}