This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ async def get_pool() -> asyncpg.Pool:
|
||||
global _pool
|
||||
if _pool is None:
|
||||
_pool = await asyncpg.create_pool(
|
||||
host=os.getenv("POSTGRES_HOST", "db"),
|
||||
host=os.getenv("POSTGRES_HOST", "192.168.178.3"),
|
||||
port=int(os.getenv("POSTGRES_PORT", "5432")),
|
||||
user=os.getenv("POSTGRES_USER", "postgres"),
|
||||
password=os.getenv("POSTGRES_PASSWORD"),
|
||||
|
||||
@@ -10,7 +10,7 @@ echo "[entrypoint] Waiting for database to be ready..."
|
||||
# Wait for PostgreSQL to accept connections (max 30s retries)
|
||||
for i in $(seq 1 30); do
|
||||
if python -c "import asyncpg,os,asyncio; asyncio.run(asyncpg.connect(
|
||||
host=os.getenv('POSTGRES_HOST','db'),
|
||||
host=os.getenv('POSTGRES_HOST','192.168.178.3'),
|
||||
port=int(os.getenv('POSTGRES_PORT','5432')),
|
||||
user=os.getenv('POSTGRES_USER','postgres'),
|
||||
password=os.getenv('POSTGRES_PASSWORD'),
|
||||
|
||||
@@ -22,7 +22,7 @@ MIGRATIONS_DIR = os.path.join(os.path.dirname(__file__), "migrations")
|
||||
def _dsn_parts() -> dict:
|
||||
"""Return a dict of DSN connection parameters from env vars."""
|
||||
return {
|
||||
"host": os.getenv("POSTGRES_HOST", "db"),
|
||||
"host": os.getenv("POSTGRES_HOST", "192.168.178.3"),
|
||||
"port": int(os.getenv("POSTGRES_PORT", "5432")),
|
||||
"user": os.getenv("POSTGRES_USER", "postgres"),
|
||||
"password": os.getenv("POSTGRES_PASSWORD"),
|
||||
|
||||
Reference in New Issue
Block a user