Note that there are some explanatory texts on larger screens.

plurals
  1. PODeploy a media folder without storing it on github with capistrano
    text
    copied!<p>I work on a php website that deploys to our servers with capistrano. The site has a very large media folder that needs to be moved into the current deploy every time. Currently what happens is I have a shell script that does a 'mount --bind' every time it deploys. And on the before deploy it does an 'unmount' of that folder. The problem is that it isn't reliable and sometimes on cleanup it rms my media folder. I thought about putting the media folder in the github, but it is 500 mbs and needs to change as users create accounts. </p> <p>So options I have thought of and want your opinions on, or your options that is better then I can think of.</p> <ol> <li>An .htaccess rewrite that whenever it looks for the media folder it reroutes it to a subdomain that has the folder on it. I just don't know if this rewrite will work for creating files and directories or only reading them. <ul> <li>I tested this today and it worked, for reading from the subdomain, but I could not get the create or write to work</li> </ul></li> <li><p>Find a beter way to deploy the media folder without having to rely on shell commands that seem to fail and destroy the folder</p></li> <li><p>Restarting the server on every deploy (this unmounts all folders) then just do the mount after the deploy and server restarted. This is just time consuming if I am doing many deploys it wouldn't work well because I have staging and production on the same server, so if I am testing on staging, restart it, it also restarts my production site, thus unmounting production well I am on staging testing.</p></li> </ol> <p>Those are the only options I could think of. Any help would be great.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload