deploy
Deploy or redeploy a Dokploy application or Docker Compose service Arguments: <app-name-or-id> [--project <project>].
SKILL.mddokploy-dev/skills/deploy/SKILL.md
GitHubDeploy Application
Trigger a deployment for an existing Dokploy application.
Arguments
Format: <app-name-or-id> [--project <project>]
- app-name-or-id: Application name or ID (required)
- --project: Project name or ID (helps resolve app by name)
Parse from "$ARGUMENTS".
Process
Resolve application:
- If argument is a UUID, use it directly.
- If a name, call
project-allto list projects, thenproject-oneon the matching project (or --project) to find the application by name.
Detect Docker Compose build mode: Call
project-all(orproject-one) and check if the project has a compose service alongside the application. If a compose service exists, the production site likely runs from the compose service — NOT the standalone application. In this case:- Warn the user: "This project has a Docker Compose service (
<compose-name>). The site likely runs from compose, not the standalone app. Deploy the compose service instead?" - If user confirms, deploy the compose service using
compose-deployMCP tool (or REST API fallback:POST /api/compose.deploywith{"composeId": "<id>"}andx-api-keyheader). - If
compose-deployMCP tool is not available, use the REST API fallback automatically. - Do NOT deploy only the standalone application when a compose service exists — this silently succeeds but leaves the site unchanged.
- Warn the user: "This project has a Docker Compose service (
Check current state using MCP tool
application-one(orcompose-onefor compose) with the ID. Report current status and last deployment.Pre-deploy checks (application mode only — skip for compose):
- Environment variables: MCP redacts
envby default (since@dokploy/mcp0.30.0):env: nullstill comes back asnulland means "never set", but[REDACTED]means a string — possibly an empty one — so it cannot tell you whether any variable exists. In that case list the variable names over REST without printing values (recipe in themcp-patternsskill, "Redaction"), or ask the user. Only if env is genuinely empty, read the project's local.env.localor.envfile and set runtime env vars viaapplication-saveEnvironment— it replaces the wholeenvstring, so never call it to "add one variable" on an application that already has env. Separate build-time vars (e.g.NEXT_PUBLIC_*) from runtime-only vars — build-time vars must also go intobuildArgs. - Build type: Check
buildType. If the project has aDockerfile, ask the user which build type to use (dockerfileornixpacks). Default recommendation:dockerfilewhen a Dockerfile exists. Set viaapplication-saveBuildTypewith all required fields (applicationId,buildType,dockerfile,dockerContextPath,dockerBuildStage,herokuVersion,railpackVersion).
- Environment variables: MCP redacts
Deploy:
- Compose mode: Use
compose-deployMCP tool or REST API fallback.compose-deploy/compose-redeployalso acceptfreshVolumes: true(v0.30.5+) — it runsdocker compose down --volumesfirst and permanently deletes the stack's volumes; use it only when the user explicitly asks for a clean slate, after a backup and an explicit confirmation (docker-composetype only, not swarm stacks). - Application mode: Use
application-deployMCP tool.
- Compose mode: Use
Monitor until completion:
- Poll
deployment.all?applicationId=<id>every 30-60 seconds to check latest deployment status. - If status is
done— report success and verify the app is reachable (check health endpoint or domain). - If status is
error— read the logs over MCP: build failure →deployment-readLogs { deploymentId, tail }; runtime crash →application-readLogs { applicationId, tail, since, search }or, for a compose stack, the per-containercompose-readLogsloop (/dokploy-dev:compose-logs). Diagnose, fix it (update env vars, build type, Dockerfile, etc.), and redeploy. Repeat until deployment succeeds. - Show the user the build/runtime logs and errors transparently.
- Poll
Example Usage
/dokploy-dev:deploy web-frontend --project my-saas
/dokploy-dev:deploy abc123-def456