Skip to content

feat(ai-autopilot): dokployTarget — second real DeployTarget adapter#162

Merged
suleimansh merged 1 commit into
mainfrom
feat/dokploy-deploy-adapter
Jul 2, 2026
Merged

feat(ai-autopilot): dokployTarget — second real DeployTarget adapter#162
suleimansh merged 1 commit into
mainfrom
feat/dokploy-deploy-adapter

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Closes #161. Follows the Cloudflare adapter (#159).

Adds the second deploy target Rom named. Unlike Cloudflare (a wrangler CLI run in the session), Dokploy is API-driven, so this is a fetch-based DeployTarget.

dokployTarget({ serverUrl, applicationId }):

  • Triggers a deploy of a pre-configured Dokploy application over the API: POST ${serverUrl}/api/application.deploy with an x-api-key header and { applicationId, title, description } (verified against the Dokploy API docs). redeploy: true uses application.redeploy.
  • Takes no runner session (Dokploy builds + serves server-side); credentials from apiToken or DOKPLOY_AUTH_TOKEN/DOKPLOY_API_KEY.
  • Never throws: missing token / no applicationId / non-2xx / network failure → { deployed: false, detail }. Dokploy doesn't return the public URL from the trigger, so success reports the triggered deployment.

Also fixes the DEFAULT_DEPLOY_TARGETS spelling dockploydokploy (the real product name, matching its API + DOKPLOY_* env vars); tests updated.

Verification: 8 unit tests with a fake fetch (endpoint + header + body, URL normalization, redeploy, missing-token/applicationId short-circuits, env-token fallback, non-2xx surfacing, network-rejection catch) — 257 tests green, typecheck+build clean, runtime export verified. Live deploy against a real Dokploy server is infra-gated. Minor changeset.

dokployTarget triggers a deployment of a pre-configured Dokploy application over
the Dokploy API (POST /api/application.deploy, x-api-key auth). Dokploy builds
and serves server-side, so it's a fetch-based target that takes no runner
session (unlike cloudflareTarget). Never throws: failures come back as
{ deployed: false, detail }. Creds from apiToken or DOKPLOY_AUTH_TOKEN/DOKPLOY_API_KEY.

Also fixes DEFAULT_DEPLOY_TARGETS spelling dockploy -> dokploy (real product name).

Closes #161
@suleimansh suleimansh added enhancement New feature or request priority: medium Worth doing, not urgent labels Jul 2, 2026
@suleimansh suleimansh self-assigned this Jul 2, 2026
@suleimansh suleimansh merged commit 8d913dd into main Jul 2, 2026
2 checks passed
@suleimansh suleimansh deleted the feat/dokploy-deploy-adapter branch July 2, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Worth doing, not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI framework: Dokploy deploy adapter (second DeployTarget)

1 participant