Aprendido desplegando cotizador (Next.js+FastAPI+Postgres, Docker Compose, repo privado) en coolify.urieljareth.org (v4.1.2): - Documenta que /applications/* devuelve 404 en esta instancia y que configurar apps git build-from-source solo es posible por la UI web. - Nuevos scripts scripts/coolify-ui/: coolify-login.mjs (guarda storageState) y Configure-CoolifyComposeApp.mjs (build pack -> Docker Compose, Reload Compose File, env vars por Developer view, dominios por servicio). - references/coolify-4.1.2-notes.md: mapa de API funcional/404, gotchas (BOM UTF-8 rompe el parser YAML de Coolify; Reload Compose File obligatorio; pin de dominios por servicio o 503; no encolar deploys concurrentes; PowerShell [IO.File]::ReadAllText para payloads de llaves). - env.local.template.ps1: COOLIFY_EMAIL/COOLIFY_PASSWORD para la UI. - SKILL.md/TOOLS.md: seccion "instance reality" y flujo UI paso a paso. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
4.7 KiB
4.7 KiB
End-to-End Deploy Flow
This is the canonical sequence the deploy_skill walks a project through.
Every box is a script in deploy_skill/scripts/. Diamonds are decisions the
operator (or the agent on behalf of the operator) makes.
┌──────────────────────────┐
│ local project dir │
│ (with source code) │
└────────────┬─────────────┘
│
┌─────────────────▼──────────────────┐
│ Initialize-CoolifyProject.ps1 │
│ -Stack node|python|compose|static │
│ -AppPort <N> │
│ writes Dockerfile, compose, │
│ .dockerignore, .gitignore additions │
└─────────────────┬──────────────────┘
│
┌─────────────────▼──────────────────┐
│ Test-PreDeployChecklist.ps1 -Strict│
│ enforces AGENTS-coolify-apps.md │
└────────────┬───────────────┬────────┘
FAIL ◄──┤ ├── PASS
│ │
STOP + report │
│
┌────────────────────────────▼────────┐
│ New-GitHubRepo.ps1 │
│ -Name <app> │
│ uses GITHUB_TOKEN (PAT) │
└────────────────────────────┬─────────┘
│
┌────────────────────────────▼─────────┐
│ git init / add / commit / push │
│ uses wincred (NOT the PAT) │
└────────────────────────────┬─────────┘
│
┌────────────────────────────▼─────────┐
│ New-CoolifyApplication.ps1 │
│ - resolve project (+ create) │
│ - resolve environment (+ create) │
│ - resolve server │
│ - POST /applications/public │
│ - POST /applications/<uuid>/envs │
│ - POST /deploy │
└────────────────────────────┬─────────┘
│
┌────────────────────────────▼─────────┐
│ Test-PostDeploy.ps1 │
│ - curl -I https://<fqdn> │
│ - docker exec getent hosts <svc> │
│ - coolify-proxy logs grep │
│ - /applications/<uuid> (API) │
└────────────────────────────┬─────────┘
│
LIVE on FQDN ◄
Publish-ProjectToCoolify.ps1 chains all six steps with one confirmation
prompt each (or -Force for unattended runs).
Branching the flow
- Already-deployed app, just env change → skip steps 1, 3, 4; call
New-CoolifyApplication.ps1 -ApplicationUuid <uuid>(it PATCHes instead of creating). - Rollback to old commit →
Invoke-CoolifyRollback.ps1; pushes arollback/<sha>branch and repoints the app, leavingmainintact. - No code yet, only validate ideas → just run
Test-PreDeployChecklist.ps1against a skeleton.