Browse Source

[rails] Only install used servers (#9388)

When testing with puma we don't need to install falcon.
Unicorn is no longer tested so we can remove it from the Gemfile.
Petrik de Heus 10 months ago
parent
commit
1975428f30

+ 0 - 4
frameworks/Ruby/rails/Gemfile

@@ -20,10 +20,6 @@ group :puma do
   gem 'puma', '~> 6.4', require: false
 end
 
-group :unicorn do
-  gem 'unicorn', '~> 6.1', require: false
-end
-
 group :agoo do
   gem 'agoo', require: false
   gem 'rackup'

+ 0 - 6
frameworks/Ruby/rails/Gemfile.lock

@@ -138,7 +138,6 @@ GEM
       rdoc (>= 4.0.0)
       reline (>= 0.4.2)
     json (2.8.1)
-    kgio (2.11.4)
     localhost (1.3.1)
     logger (1.6.1)
     loofah (2.22.0)
@@ -230,7 +229,6 @@ GEM
       rake (>= 12.2)
       thor (~> 1.0, >= 1.2.2)
       zeitwerk (~> 2.6)
-    raindrops (0.20.1)
     rake (13.2.1)
     rdoc (6.7.0)
       psych (>= 4.0.0)
@@ -253,9 +251,6 @@ GEM
       concurrent-ruby (~> 1.0)
     tzinfo-data (1.2024.2)
       tzinfo (>= 1.0.0)
-    unicorn (6.1.0)
-      kgio (~> 2.6)
-      raindrops (~> 0.7)
     useragent (0.16.10)
     webrick (1.8.2)
     websocket-driver (0.7.6)
@@ -278,7 +273,6 @@ DEPENDENCIES
   redis (~> 5.0)
   trilogy (~> 2.8.1)
   tzinfo-data
-  unicorn (~> 6.1)
 
 BUNDLED WITH
    2.3.3

+ 1 - 1
frameworks/Ruby/rails/README.md

@@ -13,7 +13,7 @@ comparing a variety of web platforms.
 The tests were run with:
 
 - [Ruby 3.3](http://www.ruby-lang.org/)
-- [Rails 7.1](http://rubyonrails.org/)
+- [Rails 7.2](http://rubyonrails.org/)
 - [Puma 6.4](http://puma.io/)
 - [MySQL](https://dev.mysql.com/)
 - [PostgreSQL](https://www.postgresql.org/)

+ 1 - 1
frameworks/Ruby/rails/rails-agoo.dockerfile

@@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
 COPY ./Gemfile* /rails/
 
 ENV BUNDLE_FORCE_RUBY_PLATFORM=true
-ENV BUNDLE_WITHOUT=trilogy
+ENV BUNDLE_WITHOUT=mysql:falcon:puma
 RUN bundle install --jobs=8
 
 COPY . /rails/

+ 2 - 1
frameworks/Ruby/rails/rails-falcon.dockerfile

@@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
 COPY ./Gemfile* /rails/
 
 ENV BUNDLE_FORCE_RUBY_PLATFORM=true
-ENV BUNDLE_WITHOUT=mysql
+ENV BUNDLE_WITHOUT=mysql:agoo:puma
 RUN bundle install --jobs=8
 
 COPY . /rails/
@@ -23,4 +23,5 @@ COPY . /rails/
 ENV RAILS_ENV=production_postgresql
 ENV PORT=8080
 ENV REDIS_URL=redis://localhost:6379/0
+CMD service redis-server start
 CMD bundle exec falcon host

+ 3 - 2
frameworks/Ruby/rails/rails-mysql.dockerfile

@@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
 COPY ./Gemfile* /rails/
 
 ENV BUNDLE_FORCE_RUBY_PLATFORM=true
-ENV BUNDLE_WITHOUT=postgresql
+ENV BUNDLE_WITHOUT=postgresql:agoo:falcon
 RUN bundle install --jobs=8
 
 COPY . /rails/
@@ -23,4 +23,5 @@ COPY . /rails/
 ENV RAILS_ENV=production_mysql
 ENV PORT=8080
 ENV REDIS_URL=redis://localhost:6379/0
-CMD ./run-with-redis.sh
+CMD service redis-server start
+CMD rails server

+ 3 - 2
frameworks/Ruby/rails/rails.dockerfile

@@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
 COPY ./Gemfile* /rails/
 
 ENV BUNDLE_FORCE_RUBY_PLATFORM=true
-ENV BUNDLE_WITHOUT=mysql
+ENV BUNDLE_WITHOUT=mysql:agoo:falcon
 RUN bundle install --jobs=8
 
 COPY . /rails/
@@ -23,4 +23,5 @@ COPY . /rails/
 ENV RAILS_ENV=production_postgresql
 ENV PORT=8080
 ENV REDIS_URL=redis://localhost:6379/0
-CMD ./run-with-redis.sh
+CMD service redis-server start
+CMD rails server

+ 0 - 3
frameworks/Ruby/rails/run-with-redis.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-service redis-server start
-bundle exec falcon host