Actualiza toolkit operativo y documentación
This commit is contained in:
@@ -213,13 +213,13 @@ Write-Host "Using server: $serverUuid" -ForegroundColor Cyan
|
||||
|
||||
if ($ServiceUuid) {
|
||||
Write-Host "Updating existing service: $ServiceUuid" -ForegroundColor Cyan
|
||||
# PATCH /services/{uuid} rechaza (422 "This field is not allowed")
|
||||
# server_uuid/project_uuid/environment_name — solo se envian name,
|
||||
# docker_compose_raw y urls. Verificado contra la instancia el 2026-09-02.
|
||||
$patch = [ordered]@{
|
||||
name = $AppName
|
||||
docker_compose_raw = $composeRaw
|
||||
urls = $urlsList
|
||||
project_uuid = $proj.uuid
|
||||
environment_name = $env.name
|
||||
server_uuid = $serverUuid
|
||||
name = $AppName
|
||||
docker_compose_raw = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($composeRaw))
|
||||
urls = $urlsList
|
||||
}
|
||||
if (-not (Confirm-Step "PATCH /services/$ServiceUuid (compose=$($composePath), urls=$($urlsList.Count), fqdn=$Fqdn)")) {
|
||||
throw "Aborted by user."
|
||||
@@ -227,13 +227,18 @@ if ($ServiceUuid) {
|
||||
$result = & $coolifyApi -Method PATCH -Path "/services/$ServiceUuid" -BodyJson ($patch | ConvertTo-Json -Depth 6) -Raw -ErrorAction Stop
|
||||
$svcUuid = $ServiceUuid
|
||||
} else {
|
||||
# Verified against Coolify 4.x on 2026-08-24:
|
||||
# - Do NOT send `type` together with `docker_compose_raw`. The API answers
|
||||
# 422 "You cannot provide both service type and docker_compose_raw."
|
||||
# `type` is only for one-click services from the library.
|
||||
# - `docker_compose_raw` MUST be base64. Sent raw it answers
|
||||
# 422 "The docker_compose_raw should be base64 encoded."
|
||||
$createBody = [ordered]@{
|
||||
type = "one-click-service" # custom service; Coolify accepts any non-empty string here
|
||||
name = $AppName
|
||||
project_uuid = $proj.uuid
|
||||
environment_name = $env.name
|
||||
server_uuid = $serverUuid
|
||||
docker_compose_raw = $composeRaw
|
||||
docker_compose_raw = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($composeRaw))
|
||||
urls = $urlsList
|
||||
instant_deploy = [bool]$InstantDeploy
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user