Set Prune=true in redeployGitStack to fix container name conflict on redeploy #6

Open
Dave wants to merge 1 commits from fix/prune-containers into test
Owner

Summary

When portainer-automation redeploys the CFTunnels stack on Portainer, Docker returns a container name conflict because the existing container isn't removed first. This fix sets Prune: true in the redeploy request body so Portainer removes the old containers before creating new ones.

Changes

  • File: common/src/main/java/com/hithomelabs/common/portainer/client/PortainerApiClient.java
  • Change: In redeployGitStack, the second parameter to PortainerRedeployRequest constructor changed from false to true, setting the Prune field to true in the JSON body sent to Portainer's API.

Testing

  • Tests pass
  • Manual verification completed
## Summary When portainer-automation redeploys the CFTunnels stack on Portainer, Docker returns a container name conflict because the existing container isn't removed first. This fix sets `Prune: true` in the redeploy request body so Portainer removes the old containers before creating new ones. ## Changes - **File:** `common/src/main/java/com/hithomelabs/common/portainer/client/PortainerApiClient.java` - **Change:** In `redeployGitStack`, the second parameter to `PortainerRedeployRequest` constructor changed from `false` to `true`, setting the `Prune` field to `true` in the JSON body sent to Portainer's API. ## Testing - [ ] Tests pass - [ ] Manual verification completed
Dave added 1 commit 2026-07-08 21:43:49 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/prune-containers:fix/prune-containers
git checkout fix/prune-containers
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Dave/CFTunnels#6
No description provided.