fix: local ip address

This commit is contained in:
Andras Bacsai 2023-11-09 15:05:42 +01:00
parent 61e1fdede9
commit 87ab4bd71e

View File

@ -31,7 +31,11 @@ public function databaseType()
public function getServiceDatabaseUrl() {
// $type = $this->databaseType();
$port = $this->public_port;
$url = "{$this->service->server->ip}:{$port}";
$realIp = $this->service->server->ip;
if ($realIp === 'host.docker.internal' || isDev()) {
$realIp = base_ip();
}
$url = "{$realIp}:{$port}";
return $url;
}
public function service()