Commit inicial - estructura base del proyecto

This commit is contained in:
2026-05-31 08:24:12 -06:00
commit cd998ce6b0
143 changed files with 18354 additions and 0 deletions
@@ -0,0 +1,35 @@
param(
[string]$Filter = "coolify|cloudflared|nextcloud|postgres|redis|openclaw|codimd|n8n|qdrant|baserow",
[switch]$All
)
$ErrorActionPreference = "Stop"
$repoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
$invokeSsh = Join-Path $repoRoot "scripts\Invoke-ProxmoxSsh.ps1"
$agentScript = Join-Path $repoRoot "scripts\ProxmoxAgent.ps1"
if (-not (Test-Path -LiteralPath $invokeSsh)) {
throw "Missing Proxmox SSH wrapper: $invokeSsh"
}
if (-not (Test-Path -LiteralPath $agentScript)) {
throw "Missing Proxmox agent script: $agentScript"
}
. $agentScript
$config = Get-ProxmoxConfig
$format = "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
$command = "pct exec $($config.CoolifyLxc) -- docker ps -a --format '$format'"
$lines = @(& $invokeSsh -Command $command)
if ($All) {
$lines
return
}
if ($lines.Count -gt 0) {
$lines | Select-Object -First 1
$lines | Select-Object -Skip 1 | Where-Object { $_ -match $Filter }
}
@@ -0,0 +1,66 @@
param(
[ValidateSet("GET", "POST", "PUT", "PATCH", "DELETE")]
[string]$Method = "GET",
[Parameter(Mandatory = $true)]
[string]$Path,
[string]$BodyJson,
[switch]$Raw
)
$ErrorActionPreference = "Stop"
$baseUrl = if ($env:COOLIFY_API_URL) {
$env:COOLIFY_API_URL
}
else {
"https://coolify.urieljareth.org/api/v1"
}
if ([string]::IsNullOrWhiteSpace($env:COOLIFY_TOKEN)) {
throw "Set COOLIFY_TOKEN before calling the Coolify API."
}
$baseUrl = $baseUrl.TrimEnd("/")
$cleanPath = if ($Path.StartsWith("/")) { $Path } else { "/$Path" }
$uri = "$baseUrl$cleanPath"
$headers = @{
Authorization = "Bearer $($env:COOLIFY_TOKEN)"
Accept = "application/json"
}
$request = @{
Method = $Method
Uri = $uri
Headers = $headers
TimeoutSec = 30
}
if ($PSBoundParameters.ContainsKey("BodyJson")) {
try {
$null = $BodyJson | ConvertFrom-Json
}
catch {
throw "BodyJson is not valid JSON: $($_.Exception.Message)"
}
$request.Body = $BodyJson
$request.ContentType = "application/json"
}
try {
$response = Invoke-RestMethod @request
}
catch {
throw "Coolify API request failed: $($_.Exception.Message)"
}
if ($Raw) {
$response
}
else {
$response | ConvertTo-Json -Depth 50
}
File diff suppressed because it is too large Load Diff