Optimized assets compressor for Capistrano.
Add the best compression to your Gemfile and bundle install
:
gem 'capistrano-the-best-compression', git: 'git@github.com:SumatoSoft/capistrano-the-best-compression.git'
Run on your server:
$ sudo apt-get install zopfli
$ cd /tmp && git clone https://github.com/google/zopfli.git && cd zopfli && make zopflipng && sudo mv zopflipng /usr/bin/
Add to your Capfile:
require 'capistrano/the_best_compression'
And to deploy.rb:
before 'deploy:publishing', 'deploy:compress_assets'
before 'deploy:publishing', 'deploy:compress_png'