diff --git a/.gitignore b/.gitignore index ac1de16..0e6abc3 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ node_modules/ # User secrets / configs appsettings.Development.json +scripts/deploy-ftp.profile.psd1 *.user *.suo diff --git a/IIS.md b/IIS.md index 02b64ed..997d8e1 100644 --- a/IIS.md +++ b/IIS.md @@ -23,6 +23,7 @@ - Data protection keys are persisted to `App_Data/keys`; ensure this folder is deployed and writable so auth cookies stay valid across app pool recycles. - Frontend base path: set `` in `wwwroot/index.html` for production so API calls include the subpath (keep blank for local/root). - Deployment script: copy `scripts/deploy-ftp.profile.sample.psd1` to `scripts/deploy-ftp.profile.psd1`, fill environment values, then run `pwsh ./scripts/deploy-ftp.ps1 -ProfilePath ./scripts/deploy-ftp.profile.psd1`. +- Shortcut command: run `pwsh ./deploy.ps1` from repo root to deploy with the local profile directly. - Prefer `WinScpSessionName` in the deploy profile to avoid embedding FTP credentials in scripted URLs. ## Permissions diff --git a/README.md b/README.md index 46bb622..ed8e0e5 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,8 @@ Pick'n'Play is a .NET 10 ASP.NET Core Minimal API app with a static HTML/CSS/JS - `Contracts/`: request/response DTOs. - `wwwroot/`: static frontend assets. - `GameList.Tests/`: integration and helper tests. -- `scripts/`: deployment scripts. - `scripts/deploy-ftp.ps1` is profile-driven via `scripts/deploy-ftp.profile.sample.psd1`. +- `scripts/`: deployment scripts (`scripts/deploy-ftp.ps1`, `scripts/deploy-ftp1.ps1`). +- `deploy.ps1`: local shortcut wrapper that runs FTP deploy using `scripts/deploy-ftp.profile.psd1`. ## Operations diff --git a/deploy.ps1 b/deploy.ps1 new file mode 100644 index 0000000..11de202 --- /dev/null +++ b/deploy.ps1 @@ -0,0 +1,14 @@ +param( + [string]$Password, + [switch]$SkipRecycle, + [switch]$SkipMigrations +) + +$deployScript = Join-Path $PSScriptRoot "scripts\deploy-ftp1.ps1" +$profilePath = Join-Path $PSScriptRoot "scripts\deploy-ftp.profile.psd1" + +& $deployScript ` + -ProfilePath $profilePath ` + -Password $Password ` + -SkipRecycle:$SkipRecycle ` + -SkipMigrations:$SkipMigrations diff --git a/scripts/deploy-ftp1.ps1 b/scripts/deploy-ftp1.ps1 new file mode 100644 index 0000000..91e4f0c --- /dev/null +++ b/scripts/deploy-ftp1.ps1 @@ -0,0 +1,14 @@ +param( + [string]$ProfilePath = (Join-Path $PSScriptRoot "deploy-ftp.profile.psd1"), + [string]$Password, + [switch]$SkipRecycle, + [switch]$SkipMigrations +) + +$scriptPath = Join-Path $PSScriptRoot "deploy-ftp.ps1" + +& $scriptPath ` + -ProfilePath $ProfilePath ` + -Password $Password ` + -SkipRecycle:$SkipRecycle ` + -SkipMigrations:$SkipMigrations