Homelabtoolkit v1
This commit is contained in:
+22
-6
@@ -21,7 +21,7 @@ param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$NasUser,
|
||||
|
||||
[string]$RemoteAppDir = "/share/Docker/embycovers"
|
||||
[string]$RemoteAppDir = "/share/Docker/homelabtoolkit"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
@@ -38,11 +38,11 @@ Require-Command scp
|
||||
$LocalDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$Remote = "$NasUser@$NasHost"
|
||||
|
||||
Write-Host "Deploying embycovers to ${Remote}:$RemoteAppDir"
|
||||
Write-Host "Deploying HomelabToolkit to ${Remote}:$RemoteAppDir"
|
||||
|
||||
ssh $Remote @"
|
||||
set -e
|
||||
mkdir -p '$RemoteAppDir' '$RemoteAppDir/output' '$RemoteAppDir/cache' '$RemoteAppDir/static/studios' '$RemoteAppDir/templates'
|
||||
mkdir -p '$RemoteAppDir' '$RemoteAppDir/output' '$RemoteAppDir/cache' '$RemoteAppDir/static/studios' '$RemoteAppDir/services' '$RemoteAppDir/frontend'
|
||||
"@
|
||||
|
||||
# Copy top-level project files.
|
||||
@@ -53,9 +53,25 @@ scp `
|
||||
"$LocalDir/requirements.txt" `
|
||||
"${Remote}:$RemoteAppDir/"
|
||||
|
||||
# Copy templates and static assets recursively.
|
||||
scp -r "$LocalDir/templates/." "${Remote}:$RemoteAppDir/templates/"
|
||||
scp -r "$LocalDir/static/." "${Remote}:$RemoteAppDir/static/"
|
||||
# Copy static assets (studio logos, served at /static).
|
||||
scp -r "$LocalDir/static/." "${Remote}:$RemoteAppDir/static/"
|
||||
|
||||
# Copy the service layer (Emby, Navidrome, music-covers). Exclude local __pycache__.
|
||||
scp -r "$LocalDir/services/." "${Remote}:$RemoteAppDir/services/"
|
||||
|
||||
# Copy the React frontend SOURCE (built inside the Docker frontend stage).
|
||||
# node_modules / dist are excluded — the image rebuilds them.
|
||||
ssh $Remote "rm -rf '$RemoteAppDir/frontend/node_modules' '$RemoteAppDir/frontend/dist'"
|
||||
scp "$LocalDir/frontend/package.json" "${Remote}:$RemoteAppDir/frontend/"
|
||||
if (Test-Path "$LocalDir/frontend/package-lock.json") {
|
||||
scp "$LocalDir/frontend/package-lock.json" "${Remote}:$RemoteAppDir/frontend/"
|
||||
}
|
||||
scp `
|
||||
"$LocalDir/frontend/vite.config.ts" `
|
||||
"$LocalDir/frontend/tsconfig.json" `
|
||||
"$LocalDir/frontend/index.html" `
|
||||
"${Remote}:$RemoteAppDir/frontend/"
|
||||
scp -r "$LocalDir/frontend/src" "${Remote}:$RemoteAppDir/frontend/"
|
||||
|
||||
# Copy any loose logo images that live at the repo root.
|
||||
$LogoFiles = Get-ChildItem -Path $LocalDir -File |
|
||||
|
||||
Reference in New Issue
Block a user