refactor: update .gitignore for deploy secrets and add redeploy scripts

This commit is contained in:
avinash
2026-06-10 16:31:06 +05:30
parent 2cd43764e2
commit 7620300ef7
5 changed files with 177 additions and 2 deletions
+27
View File
@@ -0,0 +1,27 @@
@echo off
setlocal enabledelayedexpansion
REM redeploy.bat - trigger a remote deploy FROM YOUR LAPTOP (Windows).
REM Double-click, or run from a terminal. Pass deploy.sh flags through:
REM redeploy.bat pull latest + rebuild
REM redeploy.bat --no-pull rebuild current checkout
REM redeploy.bat --rollback restore newest backup on the server
REM
REM Password order: %DEPLOY_PASS% -> deploy.secret file -> prompt.
set "HOST=118.95.33.89"
set "PORT=61"
set "USER=root"
set "APPDIR=/opt/bizgaze-support"
REM Locate plink
set "PLINK=plink"
where plink >nul 2>nul || set "PLINK=C:\Program Files\PuTTY\plink.exe"
REM Resolve password
set "PW=%DEPLOY_PASS%"
if "!PW!"=="" if exist "%~dp0deploy.secret" set /p PW=<"%~dp0deploy.secret"
if "!PW!"=="" set /p "PW=Server password for %USER%@%HOST%: "
echo ==^> Triggering deploy on %USER%@%HOST% (%APPDIR%) ...
"%PLINK%" -ssh -batch -P %PORT% -pw "!PW!" %USER%@%HOST% "cd %APPDIR% && bash deploy.sh %*"
endlocal