I have a problem on my production server where assetic:dump is timing out on a Capifony deploy (but not always).
Running assetic:dump locally is fine. Also deploying to a different staging (much less powerful) server is fine.
To fix this (and speed up deploy), I was wondering whether it’s possible to run assetic:dump before a deployment and just send those complied assets along with the rest of the deployment?
That’s a bit tricky, I’m also trying to do this (java is not working properly on my server, so deployment fails).
The problem is that Capifony deploys from a source control repository, and usually dumped assets are not on the repository (and they shouldn’t).
So I guess the only way to do this is to create a Capistrano task (Capifony is based on Capistrano) that will dump the assets and rsync them on the server.
Edit : Here’s my attempt
Edit : It does work, I’ve been using it since I answered the question.
I’m sure there are plenty of possible improvements, I’m not a ruby guy, I’m not a shell script guy either.
In your deploy.rb you can add two tasks :
And the code associated to those tasks (in the same file) :