--- name: coolify-deploy description: Deploy new projects to the local self-hosted Coolify instance end-to-end (scaffold Dockerfile/compose, create GitHub repo, push, register + deploy via Coolify API, verify, rollback). Wraps the local Proxmox & Coolify Manager repo at H:\MegaSync\Proyectos\Proxmox & Coolify Manager. Use when the user says "deploy this to Coolify", "ship this project", "create a GitHub repo and deploy", or "roll back the Coolify app". --- # Coolify Deploy (global wrapper) This is the **global** entry point. The actual skill lives in the local repo: ``` H:\MegaSync\Proyectos\Proxmox & Coolify Manager\deploy_skill\ ``` Always load the local SKILL.md and TOOLS.md from there — they have the full command reference, hard rules, and pipeline details. This wrapper exists so the skill is discoverable from any project on this machine. ## ⚠️ Instance reality (verified 2026-07, coolify.urieljareth.org v4.1.2) The live instance's REST API is **partial**: the whole `/applications/*` namespace is **404**. You **cannot create/configure a git build-from-source app via the API** here — that must be done through the **web UI with Playwright** (`deploy_skill/scripts/coolify-ui/`, needs `COOLIFY_EMAIL`/`COOLIFY_PASSWORD` in `.env.local.ps1`). What works via API: `/resources`, `/projects`, `/security/keys`, `/services`, `GET /deploy?uuid=`, `GET /deployments/{uuid}`. Read `H:\MegaSync\Proyectos\Proxmox & Coolify Manager\deploy_skill\references\coolify-4.1.2-notes.md` before deploying — it captures the full working flow and gotchas (UTF-8 BOM breaks Coolify's YAML parser; "Reload Compose File" is mandatory; pin per-service domains or you get 503; don't queue concurrent deploys; PowerShell `[IO.File]::ReadAllText` for key payloads). ## Quick start ```powershell # From any directory — cd into the manager repo first cd "H:\MegaSync\Proyectos\Proxmox & Coolify Manager" . .\.env.local.ps1 # Full pipeline on a target project (single-app, Dockerfile) .\deploy_skill\scripts\Publish-ProjectToCoolify.ps1 ` -AppPath ` -AppName ` -Fqdn https://.urieljareth.org ` -Stack node -AppPort 8080 -Init # Multi-container stack (docker-compose.coolify.yml) — POST /services .\deploy_skill\scripts\New-CoolifyService.ps1 ` -AppPath ` -AppName ` -ComposeFile docker-compose.coolify.yml ` -Fqdn https://.urieljareth.org ` -PrimaryService web -EnvFile -InstantDeploy # Operational verification of an already-deployed service # (the "definition of done": HTTP 200 + real Chromium page render) .\deploy_skill\scripts\Test-ServiceOnline.ps1 ` -Fqdn https://.urieljareth.org -ExpectTitle "" -Retries 8 ``` ## What this skill depends on - The local repo at the path above must exist (it does on this machine). - `.env.local.ps1` in that repo must define: - `COOLIFY_TOKEN` (Coolify API token) - `GITHUB_TOKEN` (GitHub PAT, scope `repo`) - **Operational verification (Test-ServiceOnline.ps1) needs Node + Playwright**. Run `npm install` once in the manager repo root. Chromium binaries cache at `%LOCALAPPDATA%\ms-playwright`. If Node is missing, the browser layer is auto-skipped (curl-only). - Git push uses Windows Credential Manager (`wincred`) — verified working for the `urieljarethbusiness-cpu` GitHub account. ## Reference paths | What | Where | |------|-------| | Local SKILL.md | `H:\MegaSync\Proyectos\Proxmox & Coolify Manager\deploy_skill\SKILL.md` | | Local TOOLS.md | `H:\MegaSync\Proyectos\Proxmox & Coolify Manager\deploy_skill\TOOLS.md` | | Pipeline scripts | `H:\MegaSync\Proyectos\Proxmox & Coolify Manager\deploy_skill\scripts\` | | Templates | `H:\MegaSync\Proyectos\Proxmox & Coolify Manager\deploy_skill\references\templates\` | | Compatibility rules | `H:\MegaSync\Proyectos\Proxmox & Coolify Manager\docs\AGENTS-coolify-apps.md` | | Coolify API reference | `H:\MegaSync\Proyectos\Proxmox & Coolify Manager\coolify_skill\references\ops\` | ## Safety - Default to read-only: run `Test-PreDeployChecklist.ps1` before any push or Coolify write. - Every mutating step asks for confirmation. `-Force` skips prompts. - Never write secrets into Markdown or commit `.env.local.ps1`. - Rollback never force-pushes to `main`. For full safety policy and workflows, read the local SKILL.md.