fix: освобождать порт 3000 перед запуском shop.service
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -52,6 +52,26 @@ cp /opt/shop/shop10.bak.*/.env /opt/shop/shop10/.env 2>/dev/null || cp /opt/shop
|
||||
bash /opt/shop/shop10/scripts/server-update.sh
|
||||
```
|
||||
|
||||
## shop.service: exit-code / activating (auto-restart)
|
||||
|
||||
**Health ответил OK, но systemd падает** — часто порт 3000 занят старым `npm start`:
|
||||
|
||||
```bash
|
||||
cd /opt/shop/shop10
|
||||
git pull
|
||||
sudo bash scripts/free-port-3000.sh
|
||||
sudo systemctl restart shop
|
||||
systemctl status shop
|
||||
```
|
||||
|
||||
Лог:
|
||||
|
||||
```bash
|
||||
journalctl -u shop -n 30 --no-pager
|
||||
# EADDRINUSE → free-port-3000.sh
|
||||
# MODULE_NOT_FOUND → npm install --omit=dev
|
||||
```
|
||||
|
||||
## Job for shop.service failed (control process exited)
|
||||
|
||||
Чаще всего не запущен PostgreSQL или не прошёл `ExecStartPre`:
|
||||
|
||||
Reference in New Issue
Block a user