Skip to content

Volumes fresh content still canceled on deployment #474

@lorenzomigliorero

Description

@lorenzomigliorero

To Reproduce

I reopen this, because it is still not fixed.

Steps

1. Create a compose service

Repository URL: https://github.com/verdaccio/verdaccio.git
Branch: master
Compose Path: docker-examples/v4/docker-local-storage-volume/docker-compose.yaml

2. Run a deployment

3. Create new content inside the storage volume

SSH into the server and create a new folder inside the docker-examples/v4/docker-local-storage-volume/storage volume. This is not the normal scenario, however verdaccio will do exactly that once you publish a new pkg.

Now the storage directory has 4 packages:

image

4. Re-run a deployment

The new folder disappeared.
image

Current vs. Expected behavior

New contents in mounted volumes should persist across deployments.

Provide environment information

OS: Ubuntu 20.04
Dokploy: v0.4.0

Which area(s) are affected? (Select all that apply)

Docker Compose

Additional context

@Siumauricio The way I envision this is:

https://github.com/Dokploy/dokploy/blob/canary/server/utils/providers/git.ts#L43

Before cloning the directory, detect mounts from docker-compose and store them in a .tpm folder.
After cloning, restore the volumes.
We can perhaps provide a flag for that. It could be useful to reset volumes in certain cases (current behavior).
This will be valid for every provider, except docker.ts.

I can work on a PR, but I need your thumbs-up first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions