fix: shop.service — wait-postgres, диагностика, права .env
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# Ожидание PostgreSQL (сокет или TCP 127.0.0.1:5432)
|
||||
for i in $(seq 1 45); do
|
||||
if pg_isready -q 2>/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
if pg_isready -h 127.0.0.1 -p 5432 -q 2>/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
echo "PostgreSQL недоступен (проверьте: systemctl status postgresql)"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user