Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

inctor's avatar

File issues/complications

Hey people,

We really wanna go rolling with Envoyer and enjoy zero-downtime deployments.

However, due to some limitations by our clients, all their assets/files/images must be within hidden files. Which we've done and it's placed within "app/storage/upload/*"

These files are excluded from GIT Control due to the size of the directory, it's getting massive.

My issue is that i don't know how to automate the moving of this folder/cloning as we use Envoyer for Deployment? As those files won't be accessible when Envoyer switches active code-base when it's done.

I would prefer it being done automaticly, but i'm open to suggestions.

Sincerely, Mads.

0 likes
2 replies
phildawson's avatar
Level 26

I only use forge but I would suggest keeping the actual storage out of that folder. I have a site that does this for the deploy script

cd /home/forge/default
git pull origin master

rm -rf /home/forge/default/storage/files
ln -s /home/forge/s3/files /home/forge/default/storage/files

composer install --no-interaction --no-dev --prefer-dist
php artisan migrate --force
inctor's avatar

So that script will symlink the actual folder (Which is outside the application scope), to being inside the storage folder?

  • That's not a bad solution really.

Will have to work out, how to manage the re-linking after the deploy process has finished. Not sure if you can set up "post-process commands" to be run.

But by deleting the storage/files, won't it delete the "s3/files" too, or does it only remove the symlink?

Please or to participate in this conversation.