Add coolify database and handle exceptions
This commit is contained in:
parent
90ad46b7c5
commit
5e36c37838
@ -41,7 +41,8 @@ class Backup extends Component
|
|||||||
}
|
}
|
||||||
public function add_coolify_database()
|
public function add_coolify_database()
|
||||||
{
|
{
|
||||||
$server = Server::find(0);
|
try {
|
||||||
|
$server = Server::findOrFail(0);
|
||||||
$out = instant_remote_process(['docker inspect coolify-db'], $server);
|
$out = instant_remote_process(['docker inspect coolify-db'], $server);
|
||||||
$envs = format_docker_envs_to_json($out);
|
$envs = format_docker_envs_to_json($out);
|
||||||
$postgres_password = $envs['POSTGRES_PASSWORD'];
|
$postgres_password = $envs['POSTGRES_PASSWORD'];
|
||||||
@ -70,6 +71,9 @@ class Backup extends Component
|
|||||||
$this->database->refresh();
|
$this->database->refresh();
|
||||||
$this->backup->refresh();
|
$this->backup->refresh();
|
||||||
$this->s3s = S3Storage::whereTeamId(0)->get();
|
$this->s3s = S3Storage::whereTeamId(0)->get();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return handleError($e, $this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function backup_now()
|
public function backup_now()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user