fix: shop.service — wait-postgres, диагностика, права .env
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -52,6 +52,32 @@ cp /opt/shop/shop10.bak.*/.env /opt/shop/shop10/.env 2>/dev/null || cp /opt/shop
|
||||
bash /opt/shop/shop10/scripts/server-update.sh
|
||||
```
|
||||
|
||||
## Job for shop.service failed (control process exited)
|
||||
|
||||
Чаще всего не запущен PostgreSQL или не прошёл `ExecStartPre`:
|
||||
|
||||
```bash
|
||||
cd /opt/shop/shop10
|
||||
git pull
|
||||
sudo bash scripts/install-postgresql-ubuntu.sh
|
||||
bash scripts/setup-postgres-ubuntu.sh
|
||||
sudo bash scripts/install-shop-service.sh
|
||||
```
|
||||
|
||||
Диагностика:
|
||||
|
||||
```bash
|
||||
bash /opt/shop/shop10/scripts/diagnose-shop-service.sh
|
||||
journalctl -u shop -n 50 --no-pager
|
||||
```
|
||||
|
||||
Скопировать старый `.env`:
|
||||
|
||||
```bash
|
||||
cp /opt/shop/.env /opt/shop/shop10/.env
|
||||
sudo bash /opt/shop/shop10/scripts/install-shop-service.sh
|
||||
```
|
||||
|
||||
## Служба shop не установлена
|
||||
|
||||
Код обновился, но systemd unit не настроен:
|
||||
|
||||
Reference in New Issue
Block a user