dokploy icon indicating copy to clipboard operation
dokploy copied to clipboard

Recreating volume make whole dokploy instance unable to deploy anymore

Open steadexe opened this issue 1 year ago • 7 comments

To Reproduce

  1. Create an application using docker compose
  2. Configure a volume within docker-compose file.
  3. Change configuration of the volume and deploy again
  4. 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

steadexe avatar Mar 25 '25 09:03 steadexe

Can you paste the docker compose before and after to try out? @SteadEXE

Siumauricio avatar Apr 04 '25 07:04 Siumauricio

No response I assume the issue is gone!

Siumauricio avatar May 04 '25 23:05 Siumauricio

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:

Image

steadexe avatar May 14 '25 10:05 steadexe

@Siumauricio I'm having this same issue. Any way we can reopen?

kgreunke avatar Aug 06 '25 05:08 kgreunke

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

djsisson avatar May 16 '26 13:05 djsisson

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

lorenzschreyer avatar Jun 05 '26 10:06 lorenzschreyer

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

djsisson avatar Jun 05 '26 17:06 djsisson