fix: local ip address
This commit is contained in:
parent
61e1fdede9
commit
87ab4bd71e
1 changed files with 5 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue