feat: initial installer release
Installer scripts and compose templates for deploying the Cameleer SaaS platform. Supports multi-tenant SaaS and standalone modes. Bootstrap: curl -fsSL https://registry.cameleer.io/.../get-cameleer.sh | bash Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
57
get-cameleer.ps1
Normal file
57
get-cameleer.ps1
Normal file
@@ -0,0 +1,57 @@
|
||||
#Requires -Version 5.1
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Bootstrap script — downloads the Cameleer installer and runs it.
|
||||
.EXAMPLE
|
||||
irm https://registry.cameleer.io/cameleer/cameleer-saas-installer/raw/branch/main/get-cameleer.ps1 | iex
|
||||
.\get-cameleer.ps1 -Version v1.2.0
|
||||
#>
|
||||
param(
|
||||
[string]$Version,
|
||||
[string]$Ref,
|
||||
[switch]$Run
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$Repo = 'https://registry.cameleer.io/cameleer/cameleer-saas-installer/raw'
|
||||
if ($Version) { $RefPath = "tag/$Version" }
|
||||
elseif ($Ref) { $RefPath = "branch/$Ref" }
|
||||
else { $RefPath = 'branch/main' }
|
||||
|
||||
$Base = "$Repo/$RefPath"
|
||||
$Dir = '.\installer'
|
||||
|
||||
$Files = @(
|
||||
'install.sh'
|
||||
'templates/docker-compose.yml'
|
||||
'templates/docker-compose.saas.yml'
|
||||
'templates/docker-compose.server.yml'
|
||||
'templates/docker-compose.tls.yml'
|
||||
'templates/docker-compose.monitoring.yml'
|
||||
'templates/traefik-dynamic.yml'
|
||||
'templates/.env.example'
|
||||
)
|
||||
|
||||
Write-Host 'Downloading Cameleer installer...'
|
||||
|
||||
New-Item -ItemType Directory -Path "$Dir\templates" -Force | Out-Null
|
||||
|
||||
foreach ($file in $Files) {
|
||||
$localPath = Join-Path $Dir $file
|
||||
$localDir = Split-Path $localPath -Parent
|
||||
if (-not (Test-Path $localDir)) { New-Item -ItemType Directory -Path $localDir -Force | Out-Null }
|
||||
|
||||
Write-Host " $file"
|
||||
Invoke-WebRequest -Uri "$Base/$file" -OutFile $localPath -UseBasicParsing
|
||||
}
|
||||
|
||||
Write-Host ''
|
||||
Write-Host "Installer ready in $Dir\"
|
||||
Write-Host 'Run: cd installer; .\install.sh'
|
||||
Write-Host ''
|
||||
|
||||
if ($Run) {
|
||||
Set-Location $Dir
|
||||
& .\install.sh @args
|
||||
}
|
||||
Reference in New Issue
Block a user