fix: server-update ищет корень репо (в т.ч. /opt/shop/shop10)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shop
2026-05-17 13:14:06 +03:00
parent e71bfa35dc
commit 42177555ac
8 changed files with 90 additions and 18 deletions
+3 -2
View File
@@ -7,8 +7,9 @@ Wants=postgresql.service
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/opt/shop
EnvironmentFile=/opt/shop/.env
# Путь к клону (package.json): /opt/shop или /opt/shop/shop10
WorkingDirectory=/opt/shop/shop10
EnvironmentFile=/opt/shop/shop10/.env
# Дождаться PostgreSQL (запуск от root, +)
ExecStartPre=+/bin/bash -c 'for i in $(seq 1 60); do pg_isready -h 127.0.0.1 -p 5432 -q && exit 0; sleep 1; done; echo "PostgreSQL не отвечает на 127.0.0.1:5432"; exit 1'
ExecStart=/usr/bin/node src/server.js