Recreating volume make whole dokploy instance unable to deploy anymore
To Reproduce
- Create an application using docker compose
- Configure a volume within docker-compose file.
- Change configuration of the volume and deploy again
- Dokploy deployment never complete and you can no longer deploy any app
I was able to fix it by attaching to dokploy's redis container and flushing all the keys
Current vs. Expected behavior
Following the above step I expect dokploy to either timeout or deploy without blocking all the instance.
Provide environment information
OS: Ubuntu 24.04
Arch: x86 (64 bits)
Which area(s) are affected? (Select all that apply)
Docker Compose
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
It looks like an interactive command wait for an input :
Volume "project-dev-lscs30_datastore_share" exists but doesn't match configuration in compose file. Recreate (data will be lost)?
Will you send a PR to fix it?
No
Can you paste the docker compose before and after to try out? @SteadEXE
No response I assume the issue is gone!
Sorry @Siumauricio, the mail was lost.
To reproduce, create a docker-compose project with this configuration:
services:
hello_world:
image: hello-world
volumes:
- nfs:/nfs
volumes:
nfs:
Deploy, then change it to:
services:
hello_world:
image: hello-world
volumes:
- nfs:/nfs
volumes:
nfs:
driver_opts:
type: nfs4
o: addr=192.168.10.253,nolock,soft,rw
device: :/Entertainment
The deployment get stuck in this state:
@Siumauricio I'm having this same issue. Any way we can reopen?
there is no bypass flag to get around the tty prompt in compose here and there is no dry run or other command dokploy can run to check beforehand, other than manually inspecting all the volumes
the only thing i can think of is for dokploy to either switch to spawn from exec so it can use stdin, or alter the onData func such that if it returns an error, it can terminate the childprocess, that way deploy compose can check for the recreate string and return an error, preventing it from getting stuck
One possible fix changing the command in the advanced section to this:
yes | docker compose -p container -f docker-compose.yml up -d --build --remove-orphans
compose has added
-y, --yes Assume "yes" as answer to all prompts and run non-interactively link
so in the above case adding -y would be sufficient but the question then becomes should a destructive op be the default, but without it, dokploy would just hang