I’m having an issue deploying Trellis either to Kinsta and to a Digital Ocean droplet. They are different projects so I think the problem is Trellis related. If it’s not, let me know.
I’m going to focus on the Digital Ocean project. The website is deployed great on /srv/www/domain.com/releases/ and the current symlink is working great after deploy. The main problem is that if I enter the release folder I find a folder named current. Inside that folder is the entire project aswell as another current folder, and another one inside… and the rabbit hole never ends…
For instance, in my last deploy on Kinsta I have 6 folders named current with all the files from git in it…
The question is, how can I prevent those folders to be created? On DO droplets I have enough space and I really don’t care, but Kinsta space is limited and if I have multiple releases the space used is extremely large…
I know I can limit the releases created but the problem of nested current folders is not solved…
Can you help me? Does this happen to you all or am I the only one?
Nested current folders should not be happening — this sounds like a bug (never heard of this before) or configuration issue that is causing problems. Have you compared your deploy role to what’s included by default in Trellis?
Ok, so I’ve uploaded to Gist the deploy role files that I’ve changed. I don’t think these changes matter at all as I’ve tested changing the files to default with same results when I deploy. Changes are marked as SM!
If I comment it out then, somehow, trellis thinks that the project_copy_folders variable is not defined, so in trellis/roles/deploy/tasks/build.yml it uses it and copies the current folder over and over (I think that’s what it does…)
If I comment out the line 16 and declare project_copy_folders as an empty array then everything works as expected. Vendor folder is genereated everytime a deploy is taken and my Koodimmonni language packages are copied to the right folder.
So, for future reference: If you have to comment out an item of a yaml variable and that variable should be an empty array, declare it empty explicitly with .
# - vendor # Need to generate vendor everytime I deploy. Koodimonni composer-dropin-installer
Thank you very much @ben for guiding me in the right direction ;D