• Sat. Nov 16th, 2024

Ruby on Rails streamlines deployment with Kamal 2

Byadmin

Sep 28, 2024



Kamal is able to perform this operation because Rails is equipped with a Dockerfile for turning an application into a container image, Heinemeier said. With Rails 8, the Dockerfile has been upgraded to include a proxy, called Thruster, which sits in front of the Puma web server to offer X-Sendfile acceleration, asset compression, and asset caching. Thus, there is no need to put an Nginx server or other web server in front. Also featured in Kamal 2 is Kamal Proxy to replace the generic Traefik option at launch. This proxy offers fast zero-downtime deploys, automated SSL certificates, and support for multiple applications on one server without a complicated configuration, according to the Rails bulletin on Rails 8.

Also in Rails 8, database-backed adapters enable usage of SQLite for features such as caching, WebSockets, and jobs. And Solid Cable, a database-backed Action Cable adapter, replaces the need for Redis to act as a pubsub server to relay WebSocket messages from the application to clients connected to different processes. And Solid Cache, a database-backed Active Support cache store, replaces the need for Redis or Memcached for storing HTML fragment caches, in particular. Solid Queue, meanwhile, a database-backed Active Job back end, means there is no need for Redis and a separate job-running framework, such as Sidekiq or Delayed Job, for most persons.

On the security front, Rails 8 puts pieces together for a complete authentication system generator, creating a starting point for a session-based, password-resettable, metadata-tracking authentication system. Rails 8 also features work to make the SQLite adapter and Ruby driver suitable for production use. And Propshaft becomes the default asset pipeline, replacing the Sprockets system, which dates back to 2009.



Source link