新增NAS一键打包部署脚本及Docker部署方案
This commit is contained in:
33
deploy/deploy-to-nas.bat
Normal file
33
deploy/deploy-to-nas.bat
Normal file
@@ -0,0 +1,33 @@
|
||||
@echo off
|
||||
setlocal EnableExtensions EnableDelayedExpansion
|
||||
|
||||
set "SCRIPT_DIR=%~dp0"
|
||||
set "SERVER_HOST=116.62.17.81"
|
||||
set "SERVER_PORT=9444"
|
||||
set "SERVER_USERNAME=wkc"
|
||||
set "SERVER_PASSWORD=wkc@0825"
|
||||
set "REMOTE_ROOT=/volume1/webapp/ccdi"
|
||||
set "DRY_RUN="
|
||||
set /a POSITION=0
|
||||
|
||||
:parse_args
|
||||
if "%~1"=="" goto run_script
|
||||
|
||||
if /I "%~1"=="--dry-run" (
|
||||
set "DRY_RUN=-DryRun"
|
||||
) else (
|
||||
set /a POSITION+=1
|
||||
if !POSITION!==1 set "SERVER_HOST=%~1"
|
||||
if !POSITION!==2 set "SERVER_PORT=%~1"
|
||||
if !POSITION!==3 set "SERVER_USERNAME=%~1"
|
||||
if !POSITION!==4 set "SERVER_PASSWORD=%~1"
|
||||
if !POSITION!==5 set "REMOTE_ROOT=%~1"
|
||||
)
|
||||
|
||||
shift
|
||||
goto parse_args
|
||||
|
||||
:run_script
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%deploy.ps1" -ServerHost "%SERVER_HOST%" -Port "%SERVER_PORT%" -Username "%SERVER_USERNAME%" -Password "%SERVER_PASSWORD%" -RemoteRoot "%REMOTE_ROOT%" %DRY_RUN%
|
||||
set "EXIT_CODE=%ERRORLEVEL%"
|
||||
endlocal & exit /b %EXIT_CODE%
|
||||
Reference in New Issue
Block a user