moar fixes

This commit is contained in:
Andras Bacsai
2023-11-27 15:25:15 +01:00
parent d4d2cc71a0
commit c1710c8f7b
10 changed files with 138 additions and 96 deletions

View File

@@ -152,6 +152,10 @@ class General extends Component
$this->application->settings->is_static = $this->is_static = false;
$this->application->settings->save();
}
if ($this->application->build_pack === 'dockercompose') {
$this->application->fqdn = null;
$this->application->settings->save();
}
$this->submit();
}
public function checkLabelUpdates()

View File

@@ -41,7 +41,7 @@ class Heading extends Component
public function deploy(bool $force_rebuild = false)
{
if (!$this->application->deployableComposeBuildPack()) {
if ($this->application->build_pack === 'dockercompose' && is_null($this->application->docker_compose_raw)) {
$this->emit('error', 'Please load a Compose file first.');
return;
}

View File

@@ -77,7 +77,7 @@ class Previews extends Component
$name = str_replace('/', '', $container['Names']);
instant_remote_process(["docker rm -f $name"], $this->application->destination->server, throwError: false);
}
ApplicationPreview::where('application_id', $this->application->id)->where('pull_request_id', $pull_request_id)->delete();
ApplicationPreview::where('application_id', $this->application->id)->where('pull_request_id', $pull_request_id)->first()->delete();
$this->application->refresh();
} catch (\Throwable $e) {
return handleError($e, $this);