Commit Graph
35 Commits
Author SHA1 Message Date
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 487e86c493 fix(service): delete a service part even when its container removal fails 2026-09-30 18:10:10 +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 2ac5969d90 fix(docker): stop matching containers by numeric resource id labels
Numeric coolify.{type}Id labels can collide with resources on another
Coolify instance managing the same server, so they no longer select or
resolve container owners. Drop the legacyId fallback from container
lookups in DeleteService and ComplexStatusCheck.

Legacy application containers without a UUID label are now resolved by
their compose service name, which starts with the application UUID.
2026-09-29 23:05:34 +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
Andras BacsaiandClaude Opus 5.5 9270413b5f fix(services): remove service containers on servers with a non-root user
The container removal started with a variable assignment
(container_ids=$(docker ps ...)). For non-root SSH users the sudo
parser turned it into "sudo container_ids=...", which sudo rejects,
so deleting a service or a service sub-resource failed. The script now
runs as one sh -c line, which the parser runs with sudo as a whole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 23:49:21 +02:00
Andras Bacsai 554b79e8dd feat: add Traefik ACME cert UI and shared managed DNS record ownership
- Proxy: list and delete Traefik ACME certificates from the server proxy
  page via new TraefikAcmeService and Get/DeleteTraefikCertificate actions
- DNS: track ownership and cross-resource references for managed DNS
  records so records are only deleted when no longer referenced; release
  records asynchronously on resource deletion via ReleaseManagedDnsRecordsJob
  and ManagedDnsRecordCleanup; harden Cloudflare provider deletion results
- Databases: fail closed on start when prerequisites or the CA certificate
  are missing (DatabaseStartException, Server::ensureCaCertificate) and
  clean up stale start activities via ResourceStartActivity
- Webhooks: throttle repeated manual webhook signature failures for
  GitHub, GitLab, Gitea and Bitbucket
- Deployments: improve compose build-context handling and compose file
  load error reporting
- Install scripts: rework terminal UI output in install.sh (stable and
  nightly)
- Misc: settings sidebar accordion fixes, log drain toggle rollback,
  add Serverside to README sponsors
- Add migrations and tests covering the above
2026-09-25 19:00:00 +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 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 BacsaiandClaude Opus 4.6 d2064dd499 fix(storage): use escapeshellarg for volume names in shell commands
Add proper shell escaping for persistent volume names when used in
docker volume rm commands. Also add volume name validation pattern
to ValidationPatterns for consistent input checking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 11:06:30 +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 2361c34a53 refactor(error-handling): replace generic Exception with RuntimeException for improved error specificity 2025-05-29 10:49:55 +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
Andras Bacsai 695ab93cf0 fixes 2024-11-06 15:16:12 +01:00
Lucas Michot d557a22b91 Remove all ray() calls 2024-10-28 13:51:23 +01:00
Andras Bacsai 04e504bb8b chore: Refactor DockerCleanupJob to remove unused middleware and uniqueId method 2024-09-23 12:10:46 +02:00
ayntk-ai 4726676248 make things more clear 2024-08-27 14:19:37 +02:00
ayntk-ai a4bb87d13b simplify DeleteService.php 2024-08-09 19:22:14 +02:00
ayntk-ai 53dff4ca4f simplify uuid variabel 2024-08-09 02:58:59 +02:00
ayntk-ai e67e03f73f added comments and removed temp ones 2024-08-09 02:15:40 +02:00
ayntk-ai 86a087056e fix volume deletion for services 2024-08-09 02:11:42 +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
ayntk-ai df796dffa2 fix delte networks and unused images of services when deleted 2024-08-08 01:02:48 +02:00
Thijmen d86274cc37 Fix styling 2024-06-10 20:43:34 +00:00
Andras Bacsai 1f18542960 fix: cleanup scheduled tasks 2024-02-14 15:14:06 +01:00
Andras Bacsai e7fdff0f69 feat: tags
ui: improvements
2024-02-02 11:50:28 +01:00
Andras Bacsai 0686e48e89 fix: service deletion 2024-01-31 09:58:41 +01:00
Andras Bacsai 795c8abf64 Refactor service and resource deletion logic 2024-01-30 17:38:07 +01:00
Andras Bacsai cc641d8cba revert 2024-01-30 17:16:52 +01:00
Andras Bacsai 73d0948734 fix: service deletion fix 2024-01-30 08:26:33 +01:00
Andras Bacsai 9e09c449cf fix: service deletion function 2024-01-29 16:03:45 +01:00
Andras Bacsai af01bc3e77 fix: service deletion bug! 2024-01-17 15:48:01 +01:00
Andras Bacsai ea271ca079 fix: delete serviceApps & serviceDatabases
fix: cleanup trashed data
2024-01-02 21:03:51 +01:00
Andras Bacsai 4e680deb93 fix: service deletion job 2023-12-08 18:32:08 +01:00