Public folder duplicate

Hey all,

I’m using cleavr to deploy a drive stocking images with Adonis 5 and Responsive Attachment Contract.

When i’m uploading images, adonis stock it in the root project /public/uploads…, a relative path.

But here is the problem i can’t solve, when Cleavr deploy the app, the project is duplicate in three folder,

root@honsha:/home/cleavr/api.drive.altab.tech# ls
current  latest  releases

And when i’m uploading img, they’r duplicated in these three folder, and so use 3x more space and i can’t afford it :confused:

Adonis Drive recent update force to use relatives paths, whereas before i could use an absolute path to solve this prob, now i can’t.

Here the problem in line:

ls | wc -l count the number of file in the folder

root@honsha:/home/cleavr/api.drive.altab.tech# ls releases/20220527125301731/public/uploads/images/ | wc -l
491
root@honsha:/home/cleavr/api.drive.altab.tech# ls latest/public/uploads/images/ | wc -l
491
root@honsha:/home/cleavr/api.drive.altab.tech# ls current/public/uploads/images/ | wc -l
491

As you can see, i got 491 images, in three different folder :frowning:

Does anyone got a solution ?

Hello @Lorlando,

The is the best solution right now for Adonis apps: Linking to a shared folder across deployments

Basically, you’ll create a folder outside of the release folder and create a symlink during deployments.

To add to what @amiedema said, the 2 folders, current and latest are just symlinks that are just pointing to the latest release releases/<TIMESTAMP>. You can check that by yourself by running ls /home/cleavr/api.drive.altab.tech. They are always synced. This is part of the feature that Cleavr provides and no, they are not duplicated and you are not paying for 3 different sets of images.