Refactor database and application start scripts

This commit is contained in:
Andras Bacsai
2024-01-12 14:15:15 +01:00
parent 5e7c6906b3
commit 27b18fbedf
8 changed files with 9 additions and 9 deletions

View File

@@ -75,7 +75,7 @@ class StartMongodb
]
]
];
if ($this->database->limits_cpuset !== 0) {
if (!is_null($this->database->limits_cpuset)) {
data_set($docker_compose, "services.{$container_name}.cpuset", $this->database->limits_cpuset);
}
if ($this->database->destination->server->isLogDrainEnabled() && $this->database->isLogDrainEnabled()) {
@@ -123,7 +123,7 @@ class StartMongodb
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml pull";
$this->commands[] = "docker compose -f $this->configuration_dir/docker-compose.yml up -d";
$this->commands[] = "echo '{$database->name} started.'";
return remote_process($this->commands, $database->destination->server,callEventOnFinish: 'DatabaseStatusChanged');
return remote_process($this->commands, $database->destination->server, callEventOnFinish: 'DatabaseStatusChanged');
}
private function generate_local_persistent_volumes()