Use docker compose
This commit is contained in:
@@ -21,7 +21,7 @@ settings = get_settings()
|
||||
|
||||
async def _get_async_engine() -> AsyncEngine:
|
||||
return create_async_engine(
|
||||
f"postgresql+asyncpg://{settings.db.username}:{settings.db.password}@localhost/{settings.db.db_name}",
|
||||
f"postgresql+asyncpg://{settings.db.username}:{settings.db.password}@{settings.db.host}:{settings.db.port}/{settings.db.db_name}",
|
||||
future=True,
|
||||
)
|
||||
|
||||
@@ -54,7 +54,7 @@ async def get_connection() -> AsyncGenerator[AsyncConnection, None]:
|
||||
|
||||
def _get_engine() -> Engine:
|
||||
return create_engine(
|
||||
f"postgresql+pg8000://{settings.db.username}:{settings.db.password}@localhost/{settings.db.db_name}"
|
||||
f"postgresql+pg8000://{settings.db.username}:{settings.db.password}@{settings.db.host}:{settings.db.port}/{settings.db.db_name}"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user