Docker Rails screenshot

Docker Rails

Author Avatar Theme by Ledermann
Updated: 29 Oct 2024
1111 Stars

Dockerize Rails 7 with ActionCable, Webpacker, Stimulus, Elasticsearch, Sidekiq

Categories

Overview

This Rails 7.0 application showcases the power of Docker for deploying production applications. Designed as a simple content management system (CMS), it allows users to manage posts with ease. The project focuses on creating a lean Docker image, leveraging the official Alpine Ruby image and multi-stage builds for optimal performance. With a small footprint of approximately 80MB, this application is not just efficient but also packed with useful features.

Utilizing modern techniques and various gems, the application enhances user experience with real-time updates, full-text search, and a sleek admin dashboard. It’s a practical demonstration of balancing functionality and efficiency in app development while using Docker’s containerization capabilities.

Features

  • Auto Refresh via ActionCable: Automatically updates displayed posts when changes occur, utilizing a robust publish/subscribe pattern.
  • Full Text Search with OpenSearch: Quickly find post content with suggestions, powered by the Searchkick gem.
  • User Authentication: Secure your platform with the Clearance gem, ensuring a safe user experience.
  • WYSIWYG Content Editing: Use the Trix editor for intuitive HTML content creation, making the editing process straightforward.
  • Image Uploads to S3: Effortlessly upload images directly to Amazon S3 using the Shrine gem and jQuery-File-Upload.
  • Background Jobs Management: Handle indexing, image processing, and broadcasting efficiently with ActiveJob and Sidekiq.
  • Cron Scheduling: Schedule regular data updates from Wikipedia using Sidekiq-Cron for seamless integration.
  • Admin Dashboards with Blazer: Gain insights and manage content effectively through a user-friendly dashboard interface.

This Rails application not only highlights the potential of Docker but also offers a solid foundation for future development and scalability.