Bunny is a fast, powerful, cheap and reliable CDN service and offers a storage service that can be used to store files which is a great alternative to Amazon S3, Azure, and Google Cloud Storage.
Active Storage Bunny is a gem that integrates BunnyCDN Storage services with Active Storage. This gem acts as an adapter to add BunnyCDN as a service to Active Storage.
This uses BunnyStorage Client gem to interact with BunnyCDN storage services.
Add this line to your application's Gemfile:
gem 'active_storage_bunny'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install active_storage_bunny
- Ruby version >= 2.5
- Rails version >= 6.0
- BunnyStorage Client gem (will be installed as a dependency)
Configure Active Storage to use the Bunny service by adding the following to your config/storage.yml
:
bunny:
service: Bunny
access_key: <%= ENV['BUNNY_ACCESS_KEY'] %>
api_key: <%= ENV['BUNNY_API_KEY'] %>
storage_zone: <%= ENV['BUNNY_STORAGE_ZONE'] %>
Then, in your environment configuration file (e.g., config/environments/production.rb
), set the Active Storage service:
config.active_storage.service = :bunny
Bug reports and pull requests are welcome on GitHub at https://github.com/rkwaap/active_storage_bunny
- Fork the repository.
- Create a new branch (git checkout -b my-new-feature).
- Commit your changes (git commit -am 'Add some feature').
- Push to the branch (git push origin my-new-feature).
- Create a new Pull Request.
The gem is available as open source under the terms of the MIT License.