Repository navigation
fix(monitoring): remove legacy container and default empty cronJob - #5141
Merged
Merged
Conversation
The swarm migration in 3848fa9 dropped the container.remove({force:true}) that the standalone deploy path used to run. Swarm tasks are named dokploy-monitoring.<slot>.<id>, so there is no name collision and the pre-v0.30.0 container survives every redeploy. It also stays pinned to an orphaned image ID once pullRemoteImage moves the latest tag, so neither a pull nor a Save clears it and it restarts forever. Cloud setup spread metricsConfig straight from the row, shipping cronJob: "" to the agent. robfig/cron rejects an empty spec, so the Go binary exits before Fiber binds 4500 and Docker restarts it every ~60s. - remove the legacy container in deployMonitoringService, which covers both setupMonitoring and setupWebMonitoring. Cleanup is best effort: a failure is logged and the deploy continues, matching the pre-migration behaviour - default cronJob when configuring monitoring for cloud - on build servers, clean up the legacy container but deploy no service. They never join the swarm, yet cloud setup did create the standalone container there before v0.30.0, and the monitoring form has always been hidden for them, so those agents are all stuck with an empty cronJob - cover the above with real-docker tests
narcisonunez
marked this pull request as ready for review
August 20, 2026 15:31
Siumauricio
requested changes
Aug 24, 2026
Collaborator
|
Hey @narcisonunez, this PR introduced The test runs flawlessly locally, but on the GitHub Actions runner, it fails instantly with We might need to either add |
Collaborator
Author
|
@imrja8 can you please send a PR with the change? |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The swarm migration in
3848fa9c0dropped thecontainer.remove({force:true})that the standalone deploy path used to run. Swarm tasks are nameddokploy-monitoring.<slot>.<id>, so there is no name collision and thepre-v0.30.0container survives every redeploy. It also stays pinned to an orphaned image ID once pullRemoteImage moves the latest tag, so neither a pull nor a Save clears it and it restarts forever.Cloud setup spread metricsConfig straight from the row, shipping cronJob: "" to the agent. robfig/cron rejects an empty spec, so the Go binary exits before Fiber binds 4500 and Docker restarts it every ~60s.
What is this PR about?
Please describe in a short paragraph what this PR is about.
Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
Screenshots (if applicable)
Greptile Summary
This PR removes legacy standalone monitoring containers before deploying the current Swarm service and supplies a default retention cron expression during cloud server setup.
dokploy-monitoringcontainer.Confidence Score: 5/5
The PR appears safe to merge because no eligible blocking failure remains from the provided follow-up-review context.
No blocking failure remains.
Reviews (3): Last reviewed commit: "mend" | Re-trigger Greptile
Context used: