small logging edit

This commit is contained in:
Walter 2025-02-21 00:50:17 +01:00
parent d4772fb325
commit 4971917417
2 changed files with 4 additions and 5 deletions

View File

@ -1,9 +1,6 @@
#!/bin/sh
echo "Waiting for postgres..."
python wait_for_db.py
echo "PostgreSQL started"
python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic --noinput

View File

@ -4,7 +4,7 @@ import os
port = int(os.environ.get("SQL_PORT")) # 5432
db_name = os.environ.get("SQL_HOST")
print(f"database at {db_name}:{port}")
print(f"Waiting for database at {db_name}:{port}")
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
while True:
@ -14,3 +14,5 @@ while True:
break
except socket.error:
time.sleep(0.1)
print(f"Database active")