-
Notifications
You must be signed in to change notification settings - Fork 161
Description
Motivation
Currently, all deployments triggered via the API or CLI are labeled with generic titles like "Manual deployment" or "Rebuild deployment," making it impossible to distinguish between different deployments in the deployment history. Only webhook-triggered deployments benefit from descriptive labels (using commit messages), which creates an inconsistent experience and makes it difficult to track and audit specific deployments.
This limitation affects teams using the API or CLI for automated deployments, as they cannot provide context about what each deployment contains (e.g., "Hotfix: Fix login bug" or "Feature: Add user authentication"). Adding support for custom titles and descriptions will improve deployment tracking, make audit logs more meaningful, and provide consistency across all deployment methods.
Current Behavior
When deployments are triggered via the API or CLI, they appear in the deployment history with hardcoded, generic titles that provide no context about the deployment's purpose or contents. This makes it challenging to identify specific deployments when reviewing history or troubleshooting issues.
Reproduction Steps:
-
Setup Application
- Spin up Dokploy locally at
localhost:3000usingpnpm run dokploy:dev - Create a Project
- Add
Service > Applicationand name itbusybox-app - Configure the application:
- Provider:
Docker - Docker Image:
busybox - Click Save (leave other fields empty)
- Provider:
- Click "Deploy" and verify deployment succeeds
- Copy the Application ID from the URL:
http://localhost:3000/dashboard/project/<<PROJECT_ID>>/services/application/<<APPLICATION_ID>>
- Spin up Dokploy locally at
-
Create API Key
- Go to
Dashboard > Settings > Profile - Create and copy an API Key
- Tip: Explore "Swagger API" from the API Key page to explore all available APIs
- Go to
-
Trigger Deployment via API
curl -X 'POST' \
'http://localhost:3000/api/application.deploy' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: <<YOUR_API_KEY>>' \
-d '{"applicationId": "<<APPLICATION_ID>>"}'- Observe Issues
- Navigate to deployment history in the UI
- Deployment shows generic title "Manual deployment" with no description
- Trigger a rebuild using application.redeploy → shows "Rebuild deployment" with no description
- Compare with webhook-triggered deployments (which show commit messages)
- Result: No way to distinguish between different API/CLI deployments or provide custom context
Expected Behavior
Users should be able to optionally specify custom titles and descriptions when triggering deployments via the API or CLI. These custom values should appear in the deployment history, similar to how commit messages are displayed for webhook-triggered deployments. When custom values are not provided, the system should maintain backward compatibility by using the existing default titles.
Acceptance Criteria:
- TRPC
application.deployandapplication.redeployendpoints accept optionaltitleanddescriptionparameters - TRPC
compose.deployandcompose.redeployendpoints accept optionaltitleanddescriptionparameters - External API
/deployendpoint accepts optionaltitleanddescriptionparameters for all application types - When custom title/description are provided, they appear in the deployment history UI
- When custom title/description are not provided, deployments use existing default titles ("Manual deployment", "Rebuild deployment", etc.) maintaining backward compatibility
- Schema validation properly handles optional parameters and rejects invalid inputs
- All existing deployments continue to work without modification
Verification
Manual Testing:
- Test TRPC endpoints with custom title and description parameters and verify they appear in the deployment history UI
- Test TRPC endpoints without custom parameters and verify default titles are used
- Test external API endpoint with custom
titleanddescriptionparameters - Test external API endpoint without custom parameters and verify backward compatibility
- Verify schema validation rejects invalid inputs (e.g., wrong data types)
- Confirm the deployment history UI displays custom titles and descriptions correctly
Automated Testing:
- Verify schema validation tests pass for the new optional parameters
- Confirm all deployment types (application, compose, preview) handle the new parameters correctly
Implementation Hints (click to expand)
- Add optional
titleanddescriptionfields to deployment and compose schemas - Update API endpoints (TRPC and external) to accept these optional parameters
- Maintain backward compatibility by defaulting to current generic titles when omitted
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx