Rails launch improvements (dockerfile-rails@1.6.7 w/ flyctl@0.2.22)

  • Add support for thruster.

    While fly.io already has HTTP/2 support, SSL certificate management,
    and HTTP caching of public assests, there may be value in the
    X-Sendfile support and compression that thruster provides.

    This support is automatically enabled if the thruster gem is
    detected in your Gemfile. It also can be selected as an option
    when generating a dockerfile:

    bin/rails generate dockerfile --thruster

    Thruster is scheduled to be included by default in Rails 8, but there is no need to wait, you can use it now.

  • No longer defaults to PostgreSQL for applications that
    have Dockerfiles unless the Dockerfile installs the necessary

    The problem solved here is we won’t update the Dockerfile
    unless you ask for it, so the initial deploy will fail if
    we include PostgreSQL. So with the change the default for
    Rails applications is Sqlite3, and we will allocate a volume
    and place the database there.

    If you want PostgreSQL, you can update your Dockerfile with the following

    bin/rails generate dockerfile --postgresql
  • When file permissions prohibit installing a new gem, proceed without installing the dockerfile generator or configuring fly.toml if a Dockerfile exists.

    This change enables fly launch to degrade gracefully rather than
    failing. In such cases it is recommended that the dockerfile
    generator is installed manually and run. You can do this using
    the following commands:

    bundle add dockerfile-rails --optimistic --group development
    bin/rails generate dockerfile