feat(core): You can validate compose files with docker compose config

fix(core): labels are now accepted with both compose styles
refactor: remove lots of ray's
This commit is contained in:
Andras Bacsai
2025-02-27 11:29:04 +01:00
parent 359806472b
commit 27e4882d57
29 changed files with 137 additions and 162 deletions

View File

@@ -63,7 +63,7 @@ class StackForm extends Component
public function saveCompose($raw)
{
$this->service->docker_compose_raw = $raw;
$this->submit(notify: false);
$this->submit(notify: true);
}
public function instantSave()
@@ -76,10 +76,6 @@ class StackForm extends Component
{
try {
$this->validate();
$isValid = validateComposeFile($this->service->docker_compose_raw, $this->service->server->id);
if ($isValid !== 'OK') {
throw new \Exception("Invalid docker-compose file.\n$isValid");
}
$this->service->save();
$this->service->saveExtraFields($this->fields);
$this->service->parse();