2025-01-15 13:02:33 +00:00
< div >
< x - slot : title >
2026-02-12 02:22:39 +00:00
{{ data_get_str ( $server , 'name' ) -> limit ( 10 ) }} > Docker Cleanup | MapleDeploy
2025-01-15 13:02:33 +00:00
</ x - slot >
2025-06-06 12:47:54 +00:00
< livewire : server . navbar : server = " $server " />
2025-01-15 13:02:33 +00:00
< div x - data = " { activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' } " class = " flex flex-col h-full gap-8 sm:flex-row " >
< x - server . sidebar : server = " $server " activeMenu = " docker-cleanup " />
< div class = " w-full " >
2025-01-21 16:03:58 +00:00
< form wire : submit = 'submit' >
< div >
< div class = " flex items-center gap-2 " >
< h2 > Docker Cleanup </ h2 >
2025-08-26 08:27:31 +00:00
< x - forms . button type = " submit " canGate = " update " : canResource = " $server " > Save </ x - forms . button >
@ can ( 'update' , $server )
< x - modal - confirmation title = " Confirm Docker Cleanup? " buttonTitle = " Trigger Manual Cleanup "
isHighlightedButton submitAction = " manualCleanup " : actions = " [
'Permanently deletes all stopped containers managed by Coolify (as containers are non-persistent, no data will be lost)' ,
'Permanently deletes all unused images' ,
'Clears build cache' ,
'Removes old versions of the Coolify helper image' ,
'Optionally permanently deletes all unused volumes (if enabled in advanced options).' ,
'Optionally permanently deletes all unused networks (if enabled in advanced options).' ,
] " :confirmWithText= " false "
: confirmWithPassword = " false " step2ButtonText = " Trigger Docker Cleanup " />
@ endcan
2025-01-21 16:03:58 +00:00
</ div >
2025-09-22 18:26:08 +00:00
< div class = " mt-1 mb-6 " > Configure Docker cleanup settings for your server .</ div >
</ div >
< div class = " flex flex-col gap-2 " >
< div class = " flex gap-4 " >
< h3 > Cleanup Configuration </ h3 >
</ div >
< div class = " flex items-center gap-4 " >
2025-08-26 08:27:31 +00:00
< x - forms . input canGate = " update " : canResource = " $server " placeholder = " */10 * * * * "
id = " dockerCleanupFrequency " label = " Docker cleanup frequency " required
2025-01-21 16:03:58 +00:00
helper = " Cron expression for Docker Cleanup.<br>You can use every_minute, hourly, daily, weekly, monthly, yearly.<br><br>Default is every night at midnight. " />
@ if ( ! $forceDockerCleanup )
2025-08-26 08:27:31 +00:00
< x - forms . input canGate = " update " : canResource = " $server " id = " dockerCleanupThreshold "
label = " Docker cleanup threshold (%) " required
2025-06-06 12:47:54 +00:00
helper = " The Docker cleanup tasks will run when the disk usage exceeds this threshold. " />
2025-01-21 16:03:58 +00:00
@ endif
</ div >
2025-09-25 09:45:03 +00:00
< div class = " w-full sm:w-96 " >
2025-09-22 18:26:08 +00:00
< x - forms . checkbox canGate = " update " : canResource = " $server "
helper = " Enabling Force Docker Cleanup or manually triggering a cleanup will perform the following actions:
< ul class = 'list-disc pl-4 mt-2' >
2025-09-25 09:45:03 +00:00
< li > Removes stopped containers managed by Coolify ( as containers are non - persistent , no data will be lost ) .</ li >
2025-09-22 18:26:08 +00:00
< li > Deletes unused images .</ li >
< li > Clears build cache .</ li >
< li > Removes old versions of the Coolify helper image .</ li >
< li > Optionally delete unused volumes ( if enabled in advanced options ) .</ li >
< li > Optionally remove unused networks ( if enabled in advanced options ) .</ li >
</ ul > "
2025-09-29 12:44:39 +00:00
instantSave id = " forceDockerCleanup " label = " Force Docker Cleanup " />
2025-09-22 18:26:08 +00:00
</ div >
</ div >
< div class = " flex flex-col gap-2 mt-6 " >
< h3 > Advanced </ h3 >
< x - callout type = " warning " title = " Caution " >
2025-09-29 12:44:39 +00:00
< p > These options can cause permanent data loss and functional issues . Only enable if you fully
understand the consequences .</ p >
2025-09-22 18:26:08 +00:00
</ x - callout >
2025-09-25 09:45:03 +00:00
< div class = " w-full sm:w-96 " >
2025-08-26 08:27:31 +00:00
< x - forms . checkbox canGate = " update " : canResource = " $server " instantSave id = " deleteUnusedVolumes "
label = " Delete Unused Volumes "
2025-09-22 18:26:08 +00:00
helper = " This option will remove all unused Docker volumes during cleanup.<br><br><strong>Warning: Data from stopped containers will be lost!</strong><br><br>Consequences include:<br>
< ul class = 'list-disc pl-4 mt-2' >
2025-09-25 09:38:56 +00:00
< li > Volumes not attached to running containers will be permanently deleted ( volumes from stopped containers are affected ) .</ li >
< li > Data stored in deleted volumes cannot be recovered .</ li >
2025-09-29 12:44:39 +00:00
</ ul > " />
2025-08-26 08:27:31 +00:00
< x - forms . checkbox canGate = " update " : canResource = " $server " instantSave id = " deleteUnusedNetworks "
label = " Delete Unused Networks "
2025-01-21 16:03:58 +00:00
helper = " This option will remove all unused Docker networks during cleanup.<br><br><strong>Warning: Functionality may be lost and containers may not be able to communicate with each other!</strong><br><br>Consequences include:<br>
2025-09-22 18:26:08 +00:00
< ul class = 'list-disc pl-4 mt-2' >
2025-09-25 09:40:23 +00:00
< li > Networks not attached to running containers will be permanently deleted ( networks used by stopped containers are affected ) .</ li >
< li > Containers may lose connectivity if required networks are removed .</ li >
2025-09-29 12:44:39 +00:00
</ ul > " />
2025-12-05 11:22:20 +00:00
< x - forms . checkbox canGate = " update " : canResource = " $server " instantSave
id = " disableApplicationImageRetention "
label = " Disable Application Image Retention "
helper = " When enabled, Docker cleanup will delete all old application images regardless of per-application retention settings. Only the currently running image will be kept.<br><br><strong>Warning: This disables rollback capabilities for all applications on this server.</strong> " />
2025-01-15 13:02:33 +00:00
</ div >
</ div >
2025-01-21 16:03:58 +00:00
</ form >
2025-01-15 19:11:40 +00:00
< div class = " mt-8 " >
2025-06-06 12:47:54 +00:00
< h3 class = " mb-4 " > Recent executions < span class = " text-xs text-neutral-500 " > ( click to check
output ) </ span ></ h3 >
2025-01-15 19:11:40 +00:00
< livewire : server . docker - cleanup - executions : server = " $server " />
</ div >
2025-01-15 13:02:33 +00:00
</ div >
</ div >
2025-01-16 14:39:53 +00:00
</ div >