macmini可以直接连自己的局域网ip,不需要通过host.docker.internal
This commit is contained in:
@@ -14,8 +14,8 @@ from typing import Optional
|
||||
class DatabaseConfig:
|
||||
"""数据库配置类"""
|
||||
|
||||
def __init__(self, env: str = "online"):
|
||||
self.host = "host.docker.internal" if env == "online" else "192.168.0.115"
|
||||
def __init__(self):
|
||||
self.host = "192.168.0.115"
|
||||
self.port = 5432
|
||||
self.database = "etf_db"
|
||||
self.username = "admin"
|
||||
|
||||
Reference in New Issue
Block a user