feat: make service databases public

This commit is contained in:
Andras Bacsai
2023-11-09 14:59:38 +01:00
parent 8f5b084931
commit 61e1fdede9
10 changed files with 126 additions and 20 deletions

View File

@@ -28,6 +28,12 @@ class ServiceDatabase extends BaseModel
}
return "standalone-$image";
}
public function getServiceDatabaseUrl() {
// $type = $this->databaseType();
$port = $this->public_port;
$url = "{$this->service->server->ip}:{$port}";
return $url;
}
public function service()
{
return $this->belongsTo(Service::class);