feat: install-shop-service.sh для установки systemd unit
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -170,21 +170,14 @@ DATABASE_URL=postgresql://shop:shop@127.0.0.1:5432/shop
|
||||
## Запуск как служба (systemd)
|
||||
|
||||
```bash
|
||||
cp /opt/shop/shop10/deploy/shop.service /etc/systemd/system/shop.service
|
||||
|
||||
cd /opt/shop/shop10
|
||||
cp .env.example .env # при первой установке
|
||||
# Заполните SESSION_SECRET и DATABASE_URL
|
||||
|
||||
npm install --omit=dev
|
||||
|
||||
# Не делайте chown -R www-data на весь /opt/shop (ломает git pull)
|
||||
systemctl daemon-reload
|
||||
systemctl enable shop
|
||||
systemctl start shop
|
||||
cp .env.example .env # при первой установке — SESSION_SECRET, DATABASE_URL
|
||||
sudo bash scripts/install-shop-service.sh
|
||||
journalctl -u shop -f
|
||||
```
|
||||
|
||||
Не делайте `chown -R www-data` на весь каталог репозитория (ломает `git pull`).
|
||||
|
||||
`EnvironmentFile=/opt/shop/shop10/.env` должен содержать `DATABASE_URL`.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user