Swarm deployment rollback not reflected in Dokploy UI (deployment appears successful even when tasks fail healthcheck)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
To Reproduce
Description
When deploying an application using Docker Swarm with health checks and rollback configuration enabled, Dokploy does not clearly indicate that a deployment failed and rolled back.
The new tasks fail the health check and exit, while the previous healthy task remains running, which is expected behavior from Docker Swarm. However, the Dokploy UI and deployment logs do not clearly mark the deployment as failed or rolled back.
This makes it difficult to detect failed deployments from the UI.
Expected Behavior
When a new deployment fails due to a health check failure and Docker Swarm performs a rollback, Dokploy should:
- clearly mark the deployment as failed
- indicate that a rollback occurred
- show the final deployment status (failed / rolled back)
- optionally display the reason (healthcheck failure)
Example expected UI state:
Deployment status: Failed (Rolled back)
Reason: Healthcheck failed
Actual Behavior
Deployment logs show the image being pulled and pushed to the internal registry, but there is no clear indication that the deployment failed.
Example logs:
Pulling registry.example.com/project/backend:latest
Image is up to date
Image pushed to registry
However, inspecting the running containers shows:
- new containers created and quickly exiting
- old container remaining
running (healthy)
Example:
exited backend-service-task-1
exited backend-service-task-2
running (healthy) backend-service-old
This indicates that the rollout failed and the previous version remained active.
Steps to Reproduce
-
Configure a service with:
- Docker Swarm deployment
- Health Check enabled
- Update Config
Failure Action = rollback
-
Deploy a version where
/healthreturns500 -
Observe:
Docker Swarm behavior:
- new task starts
- healthcheck fails
- task exits
- previous healthy task remains running
Dokploy behavior:
- deployment logs appear normal
- UI does not clearly indicate failure or rollback
Environment
Dokploy version: (fill in)
Deployment type:
- Docker provider
- Docker Swarm mode enabled
Healthcheck example:
CMD-SHELL
curl -f http://localhost:3000/health || exit 1
Additional Context
Rollback works correctly at the Docker Swarm level.
The issue appears to be related to how Dokploy reports the deployment status in the UI.
Currently the only way to detect a failed rollout is by inspecting Docker directly:
docker service ps <service>
docker ps
It would be helpful if Dokploy exposed the final deployment status more clearly.
Current vs. Expected behavior
Current behavior
After deploying a new version of the application using Docker Swarm with health checks and rollback configuration enabled, Dokploy does not clearly indicate that the deployment failed.
When the new version fails the health check:
- new service tasks are created
- those tasks exit shortly after starting
- the previous healthy task remains running
This indicates that Docker Swarm correctly prevented the rollout and kept the previous version active.
However, the Dokploy UI and deployment logs do not clearly show that the deployment failed or that a rollback occurred. The deployment process appears successful from the UI perspective.
The only visible indication of the failure is by inspecting the service containers or tasks manually.
Example observed state:
exited backend-service-task-1
exited backend-service-task-2
running (healthy) backend-service-old
Expected behavior
When a deployment fails due to a health check failure and Docker Swarm prevents the rollout (or performs a rollback), Dokploy should clearly reflect this in the UI and deployment logs.
The deployment should be marked as failed or rolled back, and the UI should indicate that the new version did not become active.
For example:
Deployment status: Failed
Reason: Healthcheck failed
Previous version kept running
This would make it much easier to detect failed deployments without manually inspecting Docker service tasks.
Provide environment information
Operating System:
OS: Ubuntu 24.04.4 LTS
Arch: x86_64
Dokploy version: 0.28.6
VPS Provider: Other
What applications/services are you trying to deploy?
Bun (Elysia) backend as Docker container (oven/bun:1.3.10-slim)
Which area(s) are affected? (Select all that apply)
Docker
Are you deploying the applications where Dokploy is installed or on a remote server?
Remote server
Additional context
No response
Will you send a PR to fix it?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Docker Swarm deployment results reach the Dokploy UI and deployment logs. Reproduce the healthcheck rollback, then inspect docker service ps <service> and docker ps to compare Swarm state with the reported deployment state. Done means the UI and logs clearly show a failed or rolled-back deployment and, where available, the healthcheck reason.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- devops, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100