mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 12:13:41 +00:00
fix: docker compose validation
This commit is contained in:
1 parent
695d3b82b5
commit
c8d48ccbff
4 files changed
+38
-7
No files matched your search
@@ -41,7 +41,6 @@ class StackForm extends Component
|
||||
}
|
||||
public function saveCompose($raw)
|
||||
{
|
||||
|
||||
$this->service->docker_compose_raw = $raw;
|
||||
$this->submit();
|
||||
}
|
||||
@@ -55,6 +54,10 @@ 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();
|
||||
|
||||
Reference in new issue
Block a user