fix: shop.service — wait-postgres, диагностика, права .env

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shop
2026-05-17 13:28:46 +03:00
parent b44419aebd
commit f13ec7f29a
5 changed files with 134 additions and 25 deletions
+13
View File
@@ -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