Commit Graph
3 Commits
Author SHA1 Message Date
Andras BacsaiandClaude Opus 4.5 45f931ecc8 Add encrypted env var backup in metadata.json for rebuild rollbacks
- 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>
2025-12-27 15:26:23 +01:00
Andras BacsaiandClaude Opus 4.5 bb6dfe9f8c Add config hash to image tags for build-time env var rollback support
- 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>
2025-12-27 15:25:55 +01:00
Andras BacsaiandClaude Opus 4.5 885fb20445 Implement versioned deployment snapshots for improved rollback
- 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>
2025-12-27 15:25:55 +01:00