Dokploy / Dokploy/dokploy

Add more fields in API of Trigger Deployment

Open
#3,378 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

What problem will this feature address?

I’m integrating the Trigger Deployment API into a GitLab CI pipeline to deploy an application after building the Docker image.

When I trigger a deployment using the API from the Application Deployments section, the deployment is shown as “Manual deployment”.
However, when using a webhook, the deployment correctly displays the commit message and commit SHA.

Is there a way to include commit metadata (commit message and SHA) when triggering a deployment via the API?

Describe the solution you'd like

Add two additional optional fields to the Trigger Deployment API request body to allow populating the commit message and commit SHA.
This would make deployments triggered via the API consistent with those triggered via webhooks, which already display this information.

Example:

curl -X 'POST' \
  'https://your-domain/api/application.deploy' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: <token>' \
  -d '{
  "applicationId": "string",
  "commitSha": "abc123",
  "commitMessage": "feat: new feature"
}'
Describe alternatives you've considered

For now, I’m using a webhook to pass the commit message and commit SHA, like this:

BODY=$(printf '{
        "object_kind": "push",
        "ref": "refs/heads/main",
        "checkout_sha": "%s",
        "commits": [
          { "message": "%s" }
        ]
      }' "$CI_COMMIT_SHA" "$CI_COMMIT_MESSAGE")

curl -X POST "$DOKPLOY_WEBHOOK_URL" \
        -H "Content-Type: application/json" \
        -H "X-Gitlab-Event: Push Hook" \
        -d "$BODY"
Additional context

No response

Will you send a PR to implement it?

I can try, maybe need help

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Trigger Deployment API entry point, /api/application.deploy, and inspect its request schema and deployment creation path. Compare this with the webhook path that already carries commit metadata, then trace how deployment details reach the Application Deployments display. Done means optional commitSha and commitMessage are accepted and shown consistently for API-triggered deployments.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, gitlab, typescript
Domain
api, backend, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.