Compare commits

...

4 Commits

Author SHA1 Message Date
Andras Bacsai
467c826c04 Merge pull request #1843 from coollabsio/next
v4.0.0-beta.239
2024-03-14 21:23:36 +01:00
Andras Bacsai
a4c164a57e fix: duplicate dockerfile 2024-03-14 21:19:37 +01:00
Andras Bacsai
bb7b1f9e0c Merge pull request #1841 from coollabsio/next
v4.0.0-beta.238
2024-03-14 19:16:35 +01:00
Andras Bacsai
f994f83ce1 revert validateCompose until further investigation 2024-03-14 19:15:30 +01:00
6 changed files with 14 additions and 7 deletions

View File

@@ -1128,9 +1128,9 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
$this->custom_healthcheck_found = false; $this->custom_healthcheck_found = false;
if ($this->application->build_pack === 'dockerfile' || $this->application->dockerfile) { if ($this->application->build_pack === 'dockerfile' || $this->application->dockerfile) {
$this->execute_remote_command([ $this->execute_remote_command([
executeInDocker($this->deployment_uuid, "cat {$this->workdir}{$this->dockerfile_location}"), "hidden" => true, "save" => 'dockerfile', "ignore_errors" => true executeInDocker($this->deployment_uuid, "cat {$this->workdir}{$this->dockerfile_location}"), "hidden" => true, "save" => 'dockerfile_from_repo', "ignore_errors" => true
]); ]);
$dockerfile = collect(Str::of($this->saved_outputs->get('dockerfile'))->trim()->explode("\n")); $dockerfile = collect(Str::of($this->saved_outputs->get('dockerfile_from_repo'))->trim()->explode("\n"));
if (str($dockerfile)->contains('HEALTHCHECK')) { if (str($dockerfile)->contains('HEALTHCHECK')) {
$this->custom_healthcheck_found = true; $this->custom_healthcheck_found = true;
} }

View File

@@ -558,6 +558,7 @@ function convert_docker_run_to_compose(?string $custom_docker_run_options = null
} }
function validateComposeFile(string $compose, int $server_id): string|Throwable { function validateComposeFile(string $compose, int $server_id): string|Throwable {
return 'OK';
try { try {
$uuid = Str::random(10); $uuid = Str::random(10);
$server = Server::findOrFail($server_id); $server = Server::findOrFail($server_id);

View File

@@ -914,8 +914,14 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
// SERVICE_FQDN_UMAMI_1000 // SERVICE_FQDN_UMAMI_1000
$port = $key->afterLast('_'); $port = $key->afterLast('_');
} else { } else {
// SERVICE_FQDN_UMAMI $last = $key->afterLast('_');
$port = null; if (is_numeric($last->value())) {
// SERVICE_FQDN_3001
$port = $last;
} else {
// SERVICE_FQDN_UMAMI
$port = null;
}
} }
if ($port) { if ($port) {
$fqdn = "$fqdn:$port"; $fqdn = "$fqdn:$port";

View File

@@ -7,7 +7,7 @@ return [
// 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.237', 'release' => '4.0.0-beta.239',
// 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'),

View File

@@ -1,3 +1,3 @@
<?php <?php
return '4.0.0-beta.237'; return '4.0.0-beta.239';

View File

@@ -4,7 +4,7 @@
"version": "3.12.36" "version": "3.12.36"
}, },
"v4": { "v4": {
"version": "4.0.0-beta.237" "version": "4.0.0-beta.239"
} }
} }
} }