docs: Server-Operations — универсальное развёртывание без привязки к домену

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shop
2026-05-17 13:34:25 +03:00
parent d31a63829c
commit 561fbd22e0
11 changed files with 336 additions and 402 deletions
+11 -5
View File
@@ -2,12 +2,12 @@
# Быстрое развёртывание / обновление на Ubuntu (без Docker)
# sudo bash scripts/quick-deploy-ubuntu.sh
#
# Каталог по умолчанию: /opt/shop/shop10
# Переопределение: SHOP_INSTALL_DIR=/opt/shop/shop10 SHOP_GIT_URL=https://...
# Каталог: SHOP_INSTALL_DIR (по умолчанию /opt/shop)
# URL репозитория: SHOP_GIT_URL (обязателен при первом clone)
set -euo pipefail
INSTALL_DIR="${SHOP_INSTALL_DIR:-/opt/shop/shop10}"
GIT_URL="${SHOP_GIT_URL:-https://git.evilfox.cc/test/shop10.git}"
INSTALL_DIR="${SHOP_INSTALL_DIR:-/opt/shop}"
GIT_URL="${SHOP_GIT_URL:-}"
if [ "$(id -u)" -ne 0 ]; then
echo "Запустите от root: sudo bash scripts/quick-deploy-ubuntu.sh"
@@ -26,7 +26,13 @@ if ! command -v node >/dev/null; then
fi
if [ ! -f "$INSTALL_DIR/package.json" ]; then
echo "Клонирование репозитория..."
if [ -z "$GIT_URL" ]; then
echo "Задайте URL репозитория:"
echo " export SHOP_GIT_URL='https://ваш-forge/user/shop.git'"
echo " sudo SHOP_GIT_URL=\"\$SHOP_GIT_URL\" bash scripts/quick-deploy-ubuntu.sh"
exit 1
fi
echo "Клонирование: $GIT_URL -> $INSTALL_DIR"
mkdir -p "$(dirname "$INSTALL_DIR")"
git clone "$GIT_URL" "$INSTALL_DIR"
fi