You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Swarm Settings don't reset to default value correctly #4553
Go to Advanced -> Cluster Settings and press Swarm Settings
Add the command, input anything as timeouts and retries
Save
Refresh the page and reopen Cluster Settings
Clear all values and Save
Refresh the page and reopen Cluster Settings
Current vs. Expected behavior
Instead of inputs being empty and placeholder values being stored all timeouts are stored as 0. Additionally test command is stored as [] which is not the same as "no value" and results in the container being stuck in Starting state.
The only way to recover from this is to either recreate the application or catch the network request happening on Save and clearing healthCheckSwarm.
Provide environment information
Dokploy version: v0.29.7
Which area(s) are affected? (Select all that apply)
Docker
Are you deploying the applications where Dokploy is installed or on a remote server?
Hi @d4rky-pl! I'm Dosu and I'm helping the Dokploy team.
The root cause is in the Zod schema used by the health check form. The schema uses z.coerce.number() for the numeric fields (Interval, Timeout, StartPeriod, Retries), which converts empty strings (what HTML5 number inputs produce when cleared) to 0 instead of undefined[1].
This breaks the form's existing hasAnyValue detection logic [2]:
consthasAnyValue=(formData.Test&&formData.Test.length>0)||formData.Interval!==undefined||formData.Timeout!==undefined||// This is 0 (truthy check passes) instead of undefinedformData.StartPeriod!==undefined||formData.Retries!==undefined;
Since the coerced 0 values pass the !== undefined checks, the form sends { Timeout: 0, Test: [], ... } to the database instead of null (which would clear the configuration entirely).
Suggested fix — replace z.coerce.number() with a transform that treats empty strings as undefined:
This preserves the existing hasAnyValue logic and correctly results in null being sent to the API when all fields are cleared. The file to modify is apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/health-check-form.tsx[3].
Activity
dosubot commentedon Jun 5, 2026
Hi @d4rky-pl! I'm Dosu and I'm helping the Dokploy team.
The root cause is in the Zod schema used by the health check form. The schema uses
z.coerce.number()for the numeric fields (Interval, Timeout, StartPeriod, Retries), which converts empty strings (what HTML5 number inputs produce when cleared) to0instead ofundefined[1].This breaks the form's existing
hasAnyValuedetection logic [2]:Since the coerced
0values pass the!== undefinedchecks, the form sends{ Timeout: 0, Test: [], ... }to the database instead ofnull(which would clear the configuration entirely).Suggested fix — replace
z.coerce.number()with a transform that treats empty strings asundefined:This preserves the existing
hasAnyValuelogic and correctly results innullbeing sent to the API when all fields are cleared. The file to modify isapps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/health-check-form.tsx[3].To reply, just mention @dosu.
Docs are dead. Just use Dosu.
fix: swarm health check fields not resetting to default values (#4558)
🚀 Release v0.29.8 (#4562)
chore(release): 0.37.0 [skip ci]