Skip to content

fix: store serverId on deployment record to enable remote log cleanup#4565

Open
Irwnda wants to merge 1 commit into
Dokploy:canaryfrom
Irwnda:fix/save-deployment-server-id
Open

fix: store serverId on deployment record to enable remote log cleanup#4565
Irwnda wants to merge 1 commit into
Dokploy:canaryfrom
Irwnda:fix/save-deployment-server-id

Conversation

@Irwnda

@Irwnda Irwnda commented Jun 6, 2026

Copy link
Copy Markdown

Problem

removeDeployment was not deleting log files for remote server deployments because serverId was never stored on the deployment record — it only lived on the parent application/compose. So deployment.serverId was always null, causing execAsync (local) to run instead of execAsyncRemote.

Changes

Store serverId from the parent service onto the deployment record at creation time across all deployment types:

  • createDeployment
  • createDeploymentCompose
  • createDeploymentPreview
  • createDeploymentBackup
  • createDeploymentSchedule
  • createDeploymentVolumeBackup

removeDeployment now can delete the log file in remote server since deployment.serverId is properly populated.

Testing

Confirmed log file is removed when delete deployment on:

  • Application
  • Compose
  • Preview
  • Backup
  • Schedule
  • Volume Backup
Before.fix.mp4
After.mp4

@Irwnda Irwnda marked this pull request as ready for review June 7, 2026 01:51
@Irwnda Irwnda requested a review from Siumauricio as a code owner June 7, 2026 01:51
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant