Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-02-17 12:26:41 +03:00
parent 88c189a48d
commit 5429305a6e

View File

@@ -1,45 +1,33 @@
#!/bin/bash
set -e
LOG="/var/log/bssapp_deploy.log"
APP="/opt/bssapp"
LOG_FILE="/var/log/bssapp_deploy.log"
exec >> "$LOG" 2>&1
(
echo "=============================="
echo "🚀 DEPLOY START $(date)"
echo "=============================="
echo "=============================="
echo "🚀 DEPLOY START $(date)"
echo "=============================="
cd /opt/bssapp || exit 1
cd $APP
echo "== STOP SERVICE =="
systemctl stop bssapp
echo "== STOP SERVICE =="
systemctl stop bssapp || true
echo "== GIT SYNC =="
git fetch origin
git reset --hard origin/master
git clean -fdx
echo "== GIT SYNC =="
git fetch origin
git reset --hard origin/master
git clean -fdx
echo "== BUILD UI =="
cd ui || exit 1
echo "== BUILD UI =="
cd ui
npm install
npm run build
export PATH=$PATH:/usr/bin:/usr/local/bin
echo "== START SERVICE =="
systemctl start bssapp
npm ci --no-progress
echo "✅ DEPLOY FINISHED $(date)"
npx quasar build
) >> "$LOG_FILE" 2>&1 &
echo "== COPY UI =="
rm -rf /opt/bssapp/svc/public/*
cp -r dist/spa/* /opt/bssapp/svc/public/
echo "== BUILD BACKEND =="
cd /opt/bssapp/svc
go build -o bssapp
echo "== START SERVICE =="
systemctl start bssapp
echo "=============================="
echo "✅ DEPLOY DONE $(date)"
echo "=============================="
exit 0