- Store encrypted build and runtime environment variables in metadata.json
- Runtime vars duplicated in .env (plain text for docker compose) and
metadata.json (encrypted backup for rebuild if .env deleted)
- Build vars only in metadata.json (needed for exact image reproduction)
- Add rollback_deployment_uuid column to track which deployment is being
rolled back to during rebuild rollbacks
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Include 8-char config hash in Docker image tag to differentiate
builds with same commit but different build-time env vars
- Pass production image name to SaveDeploymentSnapshot for accurate
metadata storage
- Read image name from metadata in Rollback component instead of
reconstructing from commit (which loses the config hash)
- Use isHighlighted for instant rollback button styling
- Add --force-recreate to ensure container restart picks up .env changes
This enables proper rollback when only build-time environment variables
changed between deployments, as each unique build configuration now
gets its own Docker image tag.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add SaveDeploymentSnapshot action to save docker-compose.yaml, .env,
and metadata.json to versioned deployment directories
- Add CleanupOldDeployments action to enforce retention policy (last 5)
- Add helper functions for deployment directory paths
- Modify ApplicationDeploymentJob to save snapshots after deployment
- Rewrite Rollback component to show deployment history
- Support instant rollback (when image exists) and rebuild rollback
New directory structure on server:
/data/coolify/applications/{uuid}/deployments/{deployment_uuid}/
- docker-compose.yaml
- .env
- metadata.json
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
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>
- Add configurable deployment_queue_limit server setting (default: 25)
- Check queue size before accepting new deployments
- Return 429 status for webhooks/API when queue is full (allows retry)
- Show error toast in UI when queue limit reached
- Add UI control in Server Advanced settings
Fixes#6708🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>