- 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>
When a database or application was in a restart loop, the restart count
persisted even after the user manually stopped the resource. This caused
the UI to continue showing "(Xx restarts)" after user intervention.
Now resets restart_count, last_restart_at, and last_restart_type when:
- User stops a database (StopDatabase action)
- User stops an application (StopApplication action)
The existing reset in GetContainersStatus is still needed for containers
that exit on their own (crash without recovery, Docker giving up).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Create a shared CleanupPreviewDeployment action that unifies PR cleanup logic across all Git providers. Previously, GitHub had comprehensive cleanup (cancels active deployments, kills helper containers, removes all PR containers), while GitLab, Bitbucket, and Gitea only did basic cleanup (delete preview record and remove one container by name).
This fix ensures all providers properly clean up orphaned PR containers when a PR is closed/merged, preventing security issues and resource waste. Also fixes early return bug in GitLab webhook handler.
Fixes#2610🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>