coolify
coolify copied to clipboard
[Bug]: `Danger Zone` does not delete all data related to the `Resource`
Description
When you create a resource in an environment and delete it before it is deployed (just create and delete right away) it leaves a docker network or a volume data around in the system that did not get deleted.
Minimal Reproduction (if possible, example repository)
I found two cases where some data is left on the host machine when you click the Delete
button in the Danger Zone
section.
- As soon as you create a new
Resource
on a environment it creates the docker network for that resource (deployment has not yet happen) and in that network is thecoolify-proxy
added by default.
It may be fixed on delete handler:
- disconnect
coolify-proxy
from the network on this resource. - then delete the network. (
docker network prune
would work as well but since is just one network at the moment of deletion target it directly would be more direct )
- As soon as you create a new
Resource
on a environment with the optionBased on a Docker Compose
it will create a directory here/data/coolify/services/<app-id>/
, there will be thedocker-compose.yml
and any volume if specified there. This time there's no network created before the deployment is done.
Issue here is that if you delete the resource the directory will stay there /data/coolify/services/<app-id>/
(with any volume data previously there ?)
Maybe fixed by rm -rf /data/coolify/services/<app-id>/
? (or is it too extreme/danger 😅, like the button says)
Exception or Error
No response
Version
v4.0.0-beta.239
Not related to the issue but I think this network that gets created on resource initialization, is the one for connecting to the preferred network (the one with the proxy) ?
This has been already solved. Now it deletes everything when you delete a resource and network.