dockerfile-rails 1.6.11 → 1.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/generators/dockerfile_generator.rb +9 -2
- data/lib/generators/templates/Dockerfile.erb +2 -2
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 6e248008553d63dc5b088dadfa1e79620d4f2db08f67bd67506a5f8a0421b973
         | 
| 4 | 
            +
              data.tar.gz: de2ded8ae1828b7db4812fc9082928c9d4d57caf3ed4aa965134c2dec76dcb83
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 8763575bc2a8d064e2ee20d3f6add987d81fede3656ba1f8c8b38c0f6808c8448ca31ca4e362ddac9bf275c38c10cb6baf0bbd113a842726623cff7a63b379c1
         | 
| 7 | 
            +
              data.tar.gz: f54366d61f5f18d0db311922c5acae95950c5e56d6b56d262a93486c0019e29ac88744035d670eded6a2a08353a24c1a1f4093fdea38ba61a439322373c8dc22
         | 
    
        data/README.md
    CHANGED
    
    | @@ -97,6 +97,7 @@ Args and environment variables can be tailored to a specific build phase by addi | |
| 97 97 | 
             
            * `--root` - run application as root
         | 
| 98 98 | 
             
            * `--windows` - make Dockerfile work for Windows users that may have set `git config --global core.autocrlf true`
         | 
| 99 99 | 
             
            * `--private-gemserver-domain=gems.example.com` - set the domain name of your private gemserver.  This is used to tell bundler for what domain to use the credentials of a private gemserver provided via a docker secret
         | 
| 100 | 
            +
            * `--no-precompiled-gems` - compile all gems instead of using precompiled versions
         | 
| 100 101 |  | 
| 101 102 | 
             
            ### Advanced Customization:
         | 
| 102 103 |  | 
| @@ -106,6 +107,7 @@ There may be times where feature detection plus flags just aren't enough.  As an | |
| 106 107 | 
             
            * `--migrate=cmd` - a replacement (generally a script) for `db:prepare`/`db:migrate`.
         | 
| 107 108 | 
             
            * `--no-gemfile-updates` - do not modify my gemfile.
         | 
| 108 109 | 
             
            * `--procfile=path` - a [Procfile](https://github.com/ddollar/foreman#foreman) to use in place of launching Rails directly.
         | 
| 110 | 
            +
            * `--registry=another.docker.registry.com` - use a different registry for sourcing Docker images (e.g. public.ecr.aws).
         | 
| 109 111 |  | 
| 110 112 | 
             
            Like with environment variables, packages, and build args, `--instructions` can be tailored to a specific build phase by adding `-base`, `-build`, or `-deploy` after the flag name, with the default being `-deploy`.
         | 
| 111 113 |  | 
| @@ -29,6 +29,7 @@ class DockerfileGenerator < Rails::Generators::Base | |
| 29 29 | 
             
                "platform" => nil,
         | 
| 30 30 | 
             
                "postgresql" => false,
         | 
| 31 31 | 
             
                "precompile" => nil,
         | 
| 32 | 
            +
                "precompiled-gems" => true,
         | 
| 32 33 | 
             
                "prepare" => true,
         | 
| 33 34 | 
             
                "private-gemserver-domain" => nil,
         | 
| 34 35 | 
             
                "procfile" => "",
         | 
| @@ -124,6 +125,9 @@ class DockerfileGenerator < Rails::Generators::Base | |
| 124 125 | 
             
              class_option :precompile, type: :string, default: OPTION_DEFAULTS.precompile,
         | 
| 125 126 | 
             
                desc: 'if set to "defer", assets:precompile will be done at deploy time'
         | 
| 126 127 |  | 
| 128 | 
            +
              class_option "precompiled-gems", type: :boolean, default: OPTION_DEFAULTS["precompiled-gems"],
         | 
| 129 | 
            +
                desc: "use precompiled gems"
         | 
| 130 | 
            +
             | 
| 127 131 | 
             
              class_option "bin-cd", type: :boolean, default: OPTION_DEFAULTS["bin-cd"],
         | 
| 128 132 | 
             
                desc: "modify binstubs to set working directory"
         | 
| 129 133 |  | 
| @@ -223,7 +227,6 @@ class DockerfileGenerator < Rails::Generators::Base | |
| 223 227 | 
             
              class_option "gemfile-updates", type: :boolean, default: OPTION_DEFAULTS["gemfile-updates"],
         | 
| 224 228 | 
             
                desc: "include gemfile updates"
         | 
| 225 229 |  | 
| 226 | 
            -
             | 
| 227 230 | 
             
              class_option "add-base", type: :array, default: [],
         | 
| 228 231 | 
             
                desc: "additional packages to install for both build and deploy"
         | 
| 229 232 |  | 
| @@ -1166,7 +1169,7 @@ private | |
| 1166 1169 | 
             
                    nginx: '/usr/sbin/nginx -g "daemon off;"',
         | 
| 1167 1170 | 
             
                    rails: "./bin/rails server -p 3001"
         | 
| 1168 1171 | 
             
                  }
         | 
| 1169 | 
            -
                elsif  | 
| 1172 | 
            +
                elsif using_thruster?
         | 
| 1170 1173 | 
             
                  {
         | 
| 1171 1174 | 
             
                    rails: "bundle exec thrust ./bin/rails server"
         | 
| 1172 1175 | 
             
                  }
         | 
| @@ -1177,6 +1180,10 @@ private | |
| 1177 1180 | 
             
                end
         | 
| 1178 1181 | 
             
              end
         | 
| 1179 1182 |  | 
| 1183 | 
            +
              def using_thruster?
         | 
| 1184 | 
            +
                options.thruster? || @gemfile.include?("thruster")
         | 
| 1185 | 
            +
              end
         | 
| 1186 | 
            +
             | 
| 1180 1187 | 
             
              def fly_processes
         | 
| 1181 1188 | 
             
                return unless File.exist? "fly.toml"
         | 
| 1182 1189 | 
             
                return unless using_sidekiq? || using_solidq?
         | 
| @@ -113,7 +113,7 @@ RUN --mount=type=secret,id=gemserver_credentials,target=/kaniko/gemserver_creden | |
| 113 113 | 
             
                bundle install<% if depend_on_bootsnap? && options.precompile != "defer" -%> && \
         | 
| 114 114 | 
             
                bundle exec bootsnap precompile --gemfile<% end %> && \
         | 
| 115 115 | 
             
            <% else -%>
         | 
| 116 | 
            -
            RUN bundle install<% if depend_on_bootsnap? && options.precompile != "defer" -%> && \
         | 
| 116 | 
            +
            RUN <% if options["precompiled-gems"] != true %>bundle config set force_ruby_platform true && \<%= "\n    " %><% end %>bundle install<% if depend_on_bootsnap? && options.precompile != "defer" -%> && \
         | 
| 117 117 | 
             
                bundle exec bootsnap precompile --gemfile<% end %> && \
         | 
| 118 118 | 
             
            <% end -%>
         | 
| 119 119 | 
             
                rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git
         | 
| @@ -296,7 +296,7 @@ EOF | |
| 296 296 |  | 
| 297 297 | 
             
            <% end -%>
         | 
| 298 298 | 
             
            # Start the server by default, this can be overwritten at runtime
         | 
| 299 | 
            -
            EXPOSE 3000
         | 
| 299 | 
            +
            EXPOSE <%= using_thruster? ? '80' : '3000' %>
         | 
| 300 300 | 
             
            <% if deploy_database == 'sqlite3' -%>
         | 
| 301 301 | 
             
            VOLUME /data
         | 
| 302 302 | 
             
            <% end -%>
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: dockerfile-rails
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.6. | 
| 4 | 
            +
              version: 1.6.13
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Sam Ruby
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2024-05- | 
| 11 | 
            +
            date: 2024-05-16 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         |