diff --git a/app/Models/ServiceDatabase.php b/app/Models/ServiceDatabase.php index 313a828b7..0dbbf6196 100644 --- a/app/Models/ServiceDatabase.php +++ b/app/Models/ServiceDatabase.php @@ -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()