57 Commits
Author SHA1 Message Date
Andras Bacsai 6cc6f1081d fix(deployments): advance the queue on all servers after a cancel
- A queued deployment on a deleted server no longer stops the queue;
  one deployment that fails to start does not stop the others
- Cancelling a deployment starts the queued deployments of the same
  application on all servers, as a finished deployment does
2026-10-05 23:10:52 +02:00
Andras Bacsai 88efc0716e fix: enforce resource team isolation and preserve ClickHouse data
Scope resource permissions and related records to the owning team across
team switches, cloning, deployments, and resource operations.

Merge ClickHouse volume mounts, preserve anonymous data volumes on stop,
and require adopting current data before starting or restarting.

Fix file storage deletion checks and add regression coverage.
2026-10-05 14:23:04 +02:00
Andras BacsaiandClaude Opus 5.5 2e2e43fddc fix(services): finish service cleanup when a volume cannot be removed
- Try to remove every volume and always delete the configuration
  directory (it holds the .env with secrets), then report the volumes that
  failed.
- Delete volume backup schedules also when a service is removed from
  Coolify only.
- The delete API no longer claims the server is unreachable when the
  caller asked to delete from Coolify only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:00:52 +02:00
Andras Bacsai 2b5bffe37d fix(service): delete resources from Coolify when server is unreachable
DeleteResourceJob no longer restores a service and rethrows when remote
cleanup fails. The resource is always removed from Coolify, and the team
gets a notification that Docker resources may remain on the server. No
notification is sent when the server itself was already deleted.

removeSubresourceContainer now returns false instead of throwing when the
server is not functional. Deleting a service application or database then
shows a warning that the container is removed on the next service start.

StopService handles a missing destination server, environment, project,
or team without throwing. The danger zone warning now shows for any
resource whose server is unreachable, not only services.
2026-09-30 08:02:02 +02:00
Andras Bacsai af983a29d8 refactor(docker): identify containers by resource UUID instead of numeric id
Container ownership labels now use UUIDs: coolify.applicationUuid,
coolify.serviceUuid, coolify.service.subUuid and coolify.databaseUuid.
Numeric ids differ between Coolify instances, so after a server transfer
the target could not find existing containers: redeploys left the old
container running and service statuses were wrong.

Containers are matched by UUID label first, then by the compose project
(Swarm: stack namespace), which is the resource UUID since July 2024, and
last by the older numeric id label. Existing containers keep working
without a redeploy and get the UUID labels on the next deploy or restart.
2026-09-29 09:57:56 +02:00
peaklabs-dev 8e61ace98d feat(database): add sqlite start, stop, restart and delete support 2026-09-24 19:03:42 +02:00
Andras Bacsai 7c86e53422 fix(service): support metadata-only deletion on unreachable servers
Add a Coolify-only deletion path, improve Docker cleanup handling, and notify teams when service deletion fails.
2026-09-23 10:50:31 +02:00
Andras Bacsai 45f9a33985 fix(resources): schedule stuck cleanup and delete metadata before jobs
Soft-delete API resources before dispatching cleanup jobs and run stuck-resource cleanup daily on one server.
2026-08-25 20:25:40 +02:00
Andras Bacsai 1ad85adbcf fix(resources): make cleanup scalable and deletion atomic 2026-08-25 20:16:23 +02:00
Andras Bacsai 38502e8205 fix(resources): preserve deletion when remote cleanup fails
Separate remote service cleanup from resource deletion and ensure database removal
completes despite cleanup errors. Update the disabled two-factor badge icon.
2026-08-20 11:10:14 +02:00
Andras Bacsai 5152698757 fix(deployments): advance queue after cancellations (#11330) 2026-08-17 16:27:00 +02:00
Andras Bacsai e79230cf37 fix(docker): replace deprecated stop flags with version-aware ones
Store each server's Docker version and build stop commands via
dockerStopCommand() so newer Docker uses --timeout instead of
deprecated --time/-t. Also show Docker version in server details.
2026-08-13 11:17:44 +02:00
Andras Bacsai ac36a59088 fix(backups): pin S3 per volume execution and harden deletes
Store s3_storage_id on scheduled volume backup executions so retention
and recovery use the S3 that received the upload. Extract
DeleteScheduledVolumeBackup for UI and resource deletion, and isolate
database backup retention failures so cleanup errors do not fail the job.
2026-07-16 14:30:58 +02:00
Andras Bacsai 1d054b23b8 Merge branch 'next' into shadow/fix-docker-time-command 2025-11-28 10:25:42 +01:00
Andras Bacsaiandcoderabbitai[bot] e79316c8b5 Update app/Jobs/DeleteResourceJob.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-11-11 11:35:30 +01:00
Andras Bacsai 0039be49b2 fix(DeleteResourceJob): escape deployment UUID and stack name in Docker commands 2025-11-11 11:30:17 +01:00
Andras Bacsai 0b8d3d395e fix: remove redundant process termination logic from deployment methods 2025-11-10 14:46:02 +01:00
Andras Bacsai 67605d50fc fix(deployment): prevent base deployments from being killed when PRs close (#7113)
- Fix container filtering to properly distinguish base deployments (pullRequestId=0) from PR deployments
- Add deployment cancellation when PR closes via webhook to prevent race conditions
- Prevent CleanupHelperContainersJob from killing active deployment containers
- Enhance error messages with exit codes and actual errors instead of vague "Oops" messages
- Protect status transitions in finally blocks to ensure proper job failure handling
2025-11-09 14:41:35 +01:00
ShadowArcanist b39690dfa2 Changed docker --time command to -t since --time is deprecated on v28 2025-10-09 13:26:10 +05:30
peaklabs-dev 36961d8ae8 fix(docker): cleanup always running on deletion
- docker cleanup was always running on deletion instead of using the settings set in the deletion modal
2025-08-04 22:14:19 +02: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 13f10028db feat(previews): implement soft delete and cleanup for ApplicationPreview, enhancing resource management in DeleteResourceJob 2025-07-14 21:17:40 +02:00
Andras Bacsai 5159b54bac refactor(DeleteResourceJob): streamline resource deletion logic and improve conditional checks for database types 2025-04-30 21:15:07 +02:00
Andras Bacsai 019ed43448 refactor(actions): standardize method naming for network and configuration deletion across application and service classes 2025-04-30 18:30:43 +02:00
peaklabs-dev 6de76ca3f8 fix(deletion): fix DB deletion
- delete file mounts, volume mounts, envs, ssl crts, backups and detach tags correctly when deleting
2025-02-04 15:32:56 +01:00
Andras Bacsai 1fe4dd722b Revert "rector: arrrrr"
This reverts commit 16c0cd10d8.
2025-01-07 15:31:43 +01:00
Andras Bacsai 16c0cd10d8 rector: arrrrr 2025-01-07 14:52:08 +01:00
Andras Bacsai 374446b90b fix: do not send internal notification for backups and status jobs 2024-11-22 12:27:13 +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
Andras Bacsai 9212f3b24c feat: Update resource deletion job to allow configurable options through API 2024-10-01 09:02:16 +02:00
Andras Bacsai 04e504bb8b chore: Refactor DockerCleanupJob to remove unused middleware and uniqueId method 2024-09-23 12:10:46 +02:00
Andras Bacsai 182087cf1b a few changes here and there 2024-09-18 21:18:47 +02:00
ayntk-ai fc3c69f687 Feat: more conformations and fixes 2024-09-05 17:54:32 +02:00
ayntk-ai 4726676248 make things more clear 2024-08-27 14:19:37 +02:00
ayntk-ai 840e225aa8 formatting and waring text 2024-08-09 22:43:18 +02:00
ayntk-ai 7d1179e7c8 fix cleanup images for databases 2024-08-09 22:25:39 +02:00
ayntk-ai 16a5c601e3 graceful db stop and db deletion fixes 2024-08-09 22:15:45 +02:00
ayntk-ai 5595853379 WIP database network, image removal 2024-08-09 03:03:40 +02:00
ayntk-ai 51071da700 fix order 2024-08-09 01:00:07 +02:00
ayntk-ai 0135e2b5c0 add logic 2024-08-09 00:30:11 +02:00
ayntk-ai 4d0acee95c UI options for deletion WIP 2024-08-08 12:31:37 +02:00
Andras Bacsai 0d8cc19698 fix: deleting application should delete preview deployments 2024-07-22 14:13:56 +02:00
Andras Bacsai 574bafd950 fix: cleanup parameter 2024-07-11 12:50:12 +02:00
Andras Bacsai 2b805f869a fix/feat: better volume cleanups 2024-07-11 12:38:54 +02:00
andrasbacsai d1a5f97f59 Fix styling 2024-06-19 06:59:46 +00:00
Thijmen d86274cc37 Fix styling 2024-06-10 20:43:34 +00:00
Andras Bacsai 9032879e20 feat: able to delete configuration from server 2024-04-12 10:54:25 +02:00
Andras Bacsai c6844ff47a Add keydb, dragonfly and clickhouse 2024-04-10 15:00:46 +02:00
Andras Bacsai 23d121d67a fix: make sure resources are deleted in async mode 2024-02-08 13:10:29 +01:00
Andras Bacsai 0686e48e89 fix: service deletion 2024-01-31 09:58:41 +01:00