A couple of days ago, I asked about how to setup Rails using Webpacker with Docker. Here are some tips to help you do that.

This page summarizes the projects mentioned and recommended in the original post on /r/rails

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Webpacker

    Use Webpack to manage app-like JavaScript modules in Rails

  • Used this to update Rails and Webpacker to the latest

  • node-gyp

    Node.js native addon build tool

  • Yes, add node_modules in dockerignore. You don't want to share node_modules between the host and the docker instance. In production environment, you won't have node_modules in the host machine anyway, so you can't even copy it over. And you are right. Packages like [node-gyp](https://github.com/nodejs/node-gyp) is dependent on the OS you use, so you can't simply copy that over to Docker. Run yarn install with yarn.lock inside Docker.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • view_component

    A framework for building reusable, testable & encapsulated view components in Ruby on Rails.

  • Rails has very cool stuff for frontend as well! The most recent developments are https://viewcomponent.org/ and https://hotwire.dev/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts