cli icon indicating copy to clipboard operation
cli copied to clipboard

application drop-deployment is missing required multipart upload options

Open gooyoung opened this issue 3 months ago • 0 comments

Summary

In @dokploy/[email protected], the generated application drop-deployment command cannot upload a ZIP file.

The command exposes only --json and calls the JSON-oriented apiPost helper with an empty options object. However, Dokploy's application.dropDeployment server procedure expects multipart form data with:

  • applicationId — required string
  • zip — required file
  • dropBuildPath — optional string

This makes the existing CLI command unusable for local artifact deployment and CI/agent workflows.

Reproduction

dokploy --version
# 0.30.2

dokploy application drop-deployment --help

Current output:

Options:
  --json
  -h, --help

Trying to supply the required values fails because the options do not exist:

dokploy application drop-deployment \
  --applicationId <application-id> \
  --zip ./artifact.zip

Calling the command without them sends JSON rather than the multipart payload required by the server procedure.

Expected behavior

The command should support an interface similar to:

dokploy application drop-deployment \
  --applicationId <application-id> \
  --zip ./artifact.zip \
  --dropBuildPath dist \
  --json

Suggested options:

  • --applicationId <value> — required
  • --zip <path> — required local ZIP file
  • --dropBuildPath <value> — optional

The request should be sent as multipart form data, preserving the existing Dokploy authentication headers, rather than being wrapped as a JSON tRPC payload.

It would also be helpful to validate that the ZIP path exists before sending the request.

Relevant implementation

The current generated command has no input options and calls:

apiPost("application.dropDeployment", opts)

The Dokploy server endpoint uses zfd.formData and requires:

{
  applicationId: string;
  zip: File;
  dropBuildPath?: string;
}

This likely needs special handling in the CLI generator for file/form-data procedures, plus a multipart request helper in src/client.ts.

Use case

This would enable deploying locally built artifacts from CI systems and coding agents without requiring interactive use of the Dokploy dashboard.

gooyoung avatar Aug 20 '26 08:08 gooyoung