Commit graph

28 commits

Author SHA1 Message Date
Andras Bacsai
9702543e20 chore: prepare for PR 2026-03-10 18:32:19 +01:00
Andras Bacsai
6ea563c6ac Fix: Prevent coolify-helper and coolify-realtime images from being pruned
Current version of infrastructure images (coolify-helper, coolify-realtime) are now protected from deletion during docker cleanup, regardless of which registry they're pulled from (ghcr.io, docker.io, or Docker Hub implicit). Old versions continue to be cleaned up as intended.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 13:38:52 +01:00
Andras Bacsai
62aa7397da Fix grep regex escaping for extended regex (ERE)
Replace preg_quote() with proper ERE escaping since grep -E uses
extended regex syntax, not PHP/PCRE. This ensures special characters
in registry URLs (dots, etc.) are properly escaped.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 12:57:57 +01:00
Andras Bacsai
511415770a Add server-level toggle to disable application image retention
Adds a new server-level setting that allows administrators to disable
per-application image retention globally for all applications on a server.
When enabled, Docker cleanup will only keep the currently running image
regardless of individual application retention settings.

Changes:
- Add migration for disable_application_image_retention boolean field
- Update ServerSetting model with cast
- Add checkbox in DockerCleanup page (Advanced section)
- Modify CleanupDocker action to check server-level setting
- Update Rollback page to show warning and disable inputs when server
  retention is disabled
- Add helper text noting server-level override capability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 12:22:20 +01:00
Andras Bacsai
710dc3ca4b Add Docker Compose support for image retention during cleanup
Support for Docker Compose applications with build: directives that create
images with uuid_servicename naming pattern (e.g., app-uuid_web:commit).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:17:23 +01:00
Andras Bacsai
4ed7a4238a Add per-application Docker image retention for rollback capability
Implement a per-application setting (`docker_images_to_keep`) in `application_settings` table to control how many Docker images are preserved during cleanup. The cleanup process now:

- Respects per-application retention settings (default: 2 images)
- Preserves the N most recent images per application for easy rollback
- Always deletes PR images and keeps the currently running image
- Dynamically excludes application images from general Docker image prune
- Cleans up non-Coolify unused images to prevent disk bloat

Fixes issues where cleanup would delete all images needed for rollback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:02:07 +01:00
Andras Bacsai
f315e4bd9c feat: add dev_helper_version to instance settings and update related functionality 2025-11-03 08:38:43 +01:00
🏔️ Peak
2a526c54d5
fix(docker): volumes get delete when stopping a service if Delete Unused Volumes is activated (#6317) 2025-08-04 21:15:56 +02:00
Andras Bacsai
324e0d1cd8 feat(CleanupDocker): add support for realtime image management in Docker cleanup process 2025-04-10 18:20:46 +02:00
peaklabs-dev
7bdef134e6
feat: get command and output for logs from CleanupDocker 2025-01-15 19:54:58 +01:00
Andras Bacsai
7dc65dfd79 fix: make sure important jobs/actions are running on high prio queue 2024-11-22 11:16:01 +01:00
peaklabs-dev
1c5ddab30d
use one constants file 2024-11-12 15:18:48 +01:00
Andras Bacsai
83549965ca Refactor instanceSettings() function for improved code readability 2024-10-01 10:37:40 +02:00
Andras Bacsai
fe20480fdc fix: proxy 2024-09-28 11:14:14 +02:00
peaklabs-dev
164a213ab1
Fix: force helper image removal 2024-09-22 20:36:41 +02:00
peaklabs-dev
ff5e445b43
Feat: Manual cleanup button and unused volumes and network deletion 2024-09-22 20:02:51 +02:00
Andras Bacsai
aa30e83f4a fix: delete older versions of the helper image other than the latest one 2024-09-10 11:33:52 +02:00
Andras Bacsai
87ee3c511c chore: Update docker image pruning command to exclude managed images 2024-09-08 12:38:22 +02:00
Andras Bacsai
3d73c98779 fix: docker cleanup job 2024-08-26 12:23:03 +02:00
Andras Bacsai
d748d8b7c6
Merge branch 'next' into auto-cleanup-improvements 2024-08-26 11:13:40 +02:00
Andras Bacsai
3f9f197282 fix: docker cleanup job 2024-08-21 10:50:05 +02:00
ayntk-ai
5d32bd250b
Fix cleanup Docker according to feedback 2024-08-18 22:41:06 +02:00
ayntk-ai
adc3346f7b
cleanup docker improvements 2024-08-09 23:27:39 +02:00
Andras Bacsai
e2bc3f4841 refactor: Remove commented out code for cleaning up networks in CleanupDocker.php 2024-08-05 13:45:33 +02:00
Andras Bacsai
19097c6692 refactor: comment out unused code for network cleanup 2024-07-11 13:04:01 +02:00
Andras Bacsai
deb4b16ae1 feat: cleanup unused docker networks from proxy 2024-07-11 10:17:15 +02:00
Thijmen
d86274cc37 Fix styling 2024-06-10 20:43:34 +00:00
Andras Bacsai
79e0df1d43 fix: cleanup docker stuffs before upgrading 2024-01-12 08:45:24 +01:00