Rails Dockerfile futures

I don’t know how to interpret the lack of response since I’ve posted the generator. I plan to put this in production next week. If you have any feedback, let me know. Meanwhile, I’ll continue to watch the Rails repository for changes.

Got dragged into some other tasks. Will review soon. But great to just continue rapid iteration on the repo now, then when I have another opening I can review in bulk :+1:

The generator now has a growing test suite. Perusing the expected results can quickly get you an overview of what the generator is capable of:

If you want to know what combination of options were used to produce any given results, look at the corresponding test case here:

The latest dockerfile-rails gem will write out options used to config/dockerfile.yml, and will use those options as the default for the next run.

If Rails new uses this gem, it can pick default options.

I will be posting a webpage suggesting different sets of options that may work well with fly.io. Other cloud hosting services can do likewise.

And, of course, developers can ignore all of our advice(s) and select their own preferences.

For many that will mean that upgrading to a new version of Ruby or adapting after installing a new gem that requires a library to be installed will be a matter of:

bin/rails generate dockerfile

… accepting the changes (or specifying --force) and committing the results.

2 Likes

Here’s the fly docs on options: Dockerfiles and fly.toml · Fly Docs

The plan is to go live on Sunday: Cut over to Rails Dockerfile Generator on Sunday 29 Jan 2023 - rails - Fly.io

What this means is that I believe the gem is feature complete at this point. It also means that it is about to get significant real world usage and testing.