Shared public directories
Clone this wiki locally
It's pretty common to have uploaded assets in a Rails application using paperclip, attachment_fu, carrier_wave, etc. One concern with having this in a deployed environment is that files would be uploaded to a directory like:
But here's a problem. You do a deploy, and they go missing. Oh no! /srv/your_app/current points to a particular release, so when you redeploy, you create a new deploy, and the files keep on living in the original release.
Fortunately, moonshine handles this, but we just have to tell it what directories you need. We can do this by updating
:app_symlinks: - photos
Now, just deploy, and the initial
/srv/your_app/shared/photos will be created by moonshine, and will be symlinked into the latest release. No more missing files!