fix: диагностика 502, /health и unit systemd для Caddy

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shop
2026-05-16 21:08:02 +03:00
parent ccebf0d26d
commit c4891b428b
6 changed files with 157 additions and 20 deletions
+8
View File
@@ -0,0 +1,8 @@
# Установка:
# mkdir -p /etc/systemd/system/caddy.service.d
# cp /opt/shop/deploy/caddy-after-shop.conf /etc/systemd/system/caddy.service.d/shop.conf
# systemctl daemon-reload
[Unit]
After=shop.service
Wants=shop.service
+20
View File
@@ -0,0 +1,20 @@
[Unit]
Description=Shop Node.js
After=network.target
[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/opt/shop
EnvironmentFile=/opt/shop/.env
# Путь к node: which node (часто /usr/bin/node)
ExecStart=/usr/bin/node src/server.js
Restart=on-failure
RestartSec=5
# Права на запись в data/ и node_modules (если нужно)
UMask=0022
[Install]
WantedBy=multi-user.target