Browse Source

Ruby/* remove TE dependencies and base files (#3511)

* Ruby/* remove TE dependencies and base files

* fix h2o and sinatra-sequel

* fix h2o_mruby
Nate 7 years ago
parent
commit
c99424010b
59 changed files with 256 additions and 169 deletions
  1. 1 1
      frameworks/Ruby/grape/config/nginx.conf
  2. 2 7
      frameworks/Ruby/grape/grape-unicorn.dockerfile
  3. 1 1
      frameworks/Ruby/grape/grape.dockerfile
  4. 22 1
      frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile
  5. 1 1
      frameworks/Ruby/hanami/config/nginx.conf
  6. 2 7
      frameworks/Ruby/hanami/hanami-unicorn.dockerfile
  7. 1 1
      frameworks/Ruby/hanami/hanami.dockerfile
  8. 1 1
      frameworks/Ruby/padrino/config/nginx.conf
  9. 2 7
      frameworks/Ruby/padrino/padrino-unicorn.dockerfile
  10. 1 1
      frameworks/Ruby/padrino/padrino.dockerfile
  11. 1 1
      frameworks/Ruby/rack-sequel/boot.rb
  12. 0 7
      frameworks/Ruby/rack-sequel/rack-sequel-base.dockerfile
  13. 0 12
      frameworks/Ruby/rack-sequel/rack-sequel-jruby-base.dockerfile
  14. 7 1
      frameworks/Ruby/rack-sequel/rack-sequel-passenger-mri.dockerfile
  15. 7 1
      frameworks/Ruby/rack-sequel/rack-sequel-postgres-passenger-mri.dockerfile
  16. 11 2
      frameworks/Ruby/rack-sequel/rack-sequel-postgres-torquebox-jruby.dockerfile
  17. 7 1
      frameworks/Ruby/rack-sequel/rack-sequel-postgres-unicorn-mri.dockerfile
  18. 7 1
      frameworks/Ruby/rack-sequel/rack-sequel-postgres.dockerfile
  19. 11 2
      frameworks/Ruby/rack-sequel/rack-sequel-torquebox-jruby.dockerfile
  20. 7 1
      frameworks/Ruby/rack-sequel/rack-sequel-unicorn-mri.dockerfile
  21. 7 1
      frameworks/Ruby/rack-sequel/rack-sequel.dockerfile
  22. 1 1
      frameworks/Ruby/rack/config/nginx.conf
  23. 2 7
      frameworks/Ruby/rack/rack-unicorn.dockerfile
  24. 1 1
      frameworks/Ruby/rack/rack.dockerfile
  25. 1 1
      frameworks/Ruby/rails/config/nginx.conf
  26. 2 7
      frameworks/Ruby/rails/rails-unicorn.dockerfile
  27. 1 1
      frameworks/Ruby/rails/rails.dockerfile
  28. 1 1
      frameworks/Ruby/roda-sequel/boot.rb
  29. 0 7
      frameworks/Ruby/roda-sequel/roda-sequel-base.dockerfile
  30. 0 12
      frameworks/Ruby/roda-sequel/roda-sequel-jruby-base.dockerfile
  31. 6 1
      frameworks/Ruby/roda-sequel/roda-sequel-passenger-mri.dockerfile
  32. 6 1
      frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile
  33. 9 2
      frameworks/Ruby/roda-sequel/roda-sequel-postgres-torquebox-jruby.dockerfile
  34. 6 1
      frameworks/Ruby/roda-sequel/roda-sequel-postgres-unicorn-mri.dockerfile
  35. 6 1
      frameworks/Ruby/roda-sequel/roda-sequel-postgres.dockerfile
  36. 9 2
      frameworks/Ruby/roda-sequel/roda-sequel-torquebox-jruby.dockerfile
  37. 6 1
      frameworks/Ruby/roda-sequel/roda-sequel-unicorn-mri.dockerfile
  38. 6 1
      frameworks/Ruby/roda-sequel/roda-sequel.dockerfile
  39. 1 1
      frameworks/Ruby/sinatra-sequel/boot.rb
  40. 1 2
      frameworks/Ruby/sinatra-sequel/sinatra-sequel-base.dockerfile
  41. 1 5
      frameworks/Ruby/sinatra-sequel/sinatra-sequel-jruby-base.dockerfile
  42. 6 1
      frameworks/Ruby/sinatra-sequel/sinatra-sequel-passenger-mri.dockerfile
  43. 6 1
      frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-passenger-mri.dockerfile
  44. 9 2
      frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-torquebox-jruby.dockerfile
  45. 6 1
      frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-unicorn-mri.dockerfile
  46. 6 1
      frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile
  47. 9 2
      frameworks/Ruby/sinatra-sequel/sinatra-sequel-torquebox-jruby.dockerfile
  48. 6 1
      frameworks/Ruby/sinatra-sequel/sinatra-sequel-unicorn-mri.dockerfile
  49. 6 1
      frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile
  50. 1 1
      frameworks/Ruby/sinatra/boot.rb
  51. 0 7
      frameworks/Ruby/sinatra/sinatra-base.dockerfile
  52. 6 1
      frameworks/Ruby/sinatra/sinatra-passenger-mri.dockerfile
  53. 6 1
      frameworks/Ruby/sinatra/sinatra-postgres-passenger-mri.dockerfile
  54. 6 1
      frameworks/Ruby/sinatra/sinatra-postgres-unicorn-mri.dockerfile
  55. 6 1
      frameworks/Ruby/sinatra/sinatra-postgres.dockerfile
  56. 6 1
      frameworks/Ruby/sinatra/sinatra-unicorn-mri.dockerfile
  57. 6 1
      frameworks/Ruby/sinatra/sinatra.dockerfile
  58. 0 10
      toolset/setup/docker/languages/jruby-9.1.dockerfile
  59. 0 21
      toolset/setup/docker/languages/ruby-2.4.dockerfile

+ 1 - 1
frameworks/Ruby/grape/config/nginx.conf

@@ -37,7 +37,7 @@ events {
 
 http {
   # nginx will find this file in the config directory set at nginx build time
-  include /nginx/conf/mime.types;
+  include /etc/nginx/mime.types;
 
   # fallback in case we can't determine a type
   default_type application/octet-stream;

+ 2 - 7
frameworks/Ruby/grape/grape-unicorn.dockerfile

@@ -1,11 +1,6 @@
-FROM techempower/nginx:0.1
+FROM ruby:2.4
 
-FROM techempower/ruby-2.4:0.1
-
-COPY --from=0 /nginx /nginx
-
-ENV NGINX_HOME="/nginx"
-ENV PATH=/nginx/sbin:${PATH}
+RUN apt update -yqq && apt install -yqq nginx
 
 ADD ./ /grape
 

+ 1 - 1
frameworks/Ruby/grape/grape.dockerfile

@@ -1,4 +1,4 @@
-FROM techempower/ruby-2.4:0.1
+FROM ruby:2.4
 
 ADD ./ /grape
 

+ 22 - 1
frameworks/Ruby/h2o_mruby/h2o_mruby.dockerfile

@@ -1,4 +1,25 @@
-FROM techempower/h2o:0.1
+FROM ruby:2.4
+
+ENV H2O_HOME=/h2o
+ENV VERSION="2.2.4"
+ENV ARCHIVE=v${VERSION}.tar.gz
+ENV BUILD_DIR=h2o-${VERSION}
+
+RUN mkdir /h2o
+
+WORKDIR /h2o
+
+RUN wget -q https://github.com/h2o/h2o/archive/$ARCHIVE
+RUN tar xf $ARCHIVE
+
+WORKDIR /h2o/h2o-2.2.4
+
+RUN apt update -yqq && apt install -yqq make cmake libmcrypt-dev libssl-dev bison
+RUN cmake -DCMAKE_INSTALL_PREFIX="$H2O_HOME" -DCMAKE_C_FLAGS="-flto -march=native" \
+      -DCMAKE_AR=/usr/bin/gcc-ar -DCMAKE_RANLIB=/usr/bin/gcc-ranlib -DWITH_MRUBY=on
+RUN make -j "$(nproc)" install
+
+ENV PATH=/h2o/bin:${PATH}
 
 ADD ./h2o.conf /h2o_mruby/
 

+ 1 - 1
frameworks/Ruby/hanami/config/nginx.conf

@@ -37,7 +37,7 @@ events {
 
 http {
   # nginx will find this file in the config directory set at nginx build time
-  include /nginx/conf/mime.types;
+  include /etc/nginx/mime.types;
 
   # fallback in case we can't determine a type
   default_type application/octet-stream;

+ 2 - 7
frameworks/Ruby/hanami/hanami-unicorn.dockerfile

@@ -1,11 +1,6 @@
-FROM techempower/nginx:0.1
+FROM ruby:2.4
 
-FROM techempower/ruby-2.4:0.1
-
-COPY --from=0 /nginx /nginx
-
-ENV NGINX_HOME="/nginx"
-ENV PATH=/nginx/sbin:${PATH}
+RUN apt update -yqq && apt install -yqq nginx
 
 ADD ./ /hanami
 

+ 1 - 1
frameworks/Ruby/hanami/hanami.dockerfile

@@ -1,4 +1,4 @@
-FROM techempower/ruby-2.4:0.1
+FROM ruby:2.4
 
 ADD ./ /hanami
 

+ 1 - 1
frameworks/Ruby/padrino/config/nginx.conf

@@ -37,7 +37,7 @@ events {
 
 http {
   # nginx will find this file in the config directory set at nginx build time
-  include /nginx/conf/mime.types;
+  include /etc/nginx/mime.types;
 
   # fallback in case we can't determine a type
   default_type application/octet-stream;

+ 2 - 7
frameworks/Ruby/padrino/padrino-unicorn.dockerfile

@@ -1,11 +1,6 @@
-FROM techempower/nginx:0.1
+FROM ruby:2.4
 
-FROM techempower/ruby-2.4:0.1
-
-COPY --from=0 /nginx /nginx
-
-ENV NGINX_HOME="/nginx"
-ENV PATH=/nginx/sbin:${PATH}
+RUN apt update -yqq && apt install -yqq nginx
 
 ADD ./ /padrino
 

+ 1 - 1
frameworks/Ruby/padrino/padrino.dockerfile

@@ -1,4 +1,4 @@
-FROM techempower/ruby-2.4:0.1
+FROM ruby:2.4
 
 ADD ./ /padrino
 

+ 1 - 1
frameworks/Ruby/rack-sequel/boot.rb

@@ -45,7 +45,7 @@ def connect(dbtype)
   Sequel.connect \
     '%{adapter}://%{host}/%{database}?user=%{user}&password=%{password}' % {
       :adapter=>adapters.fetch(dbtype).fetch(defined?(JRUBY_VERSION) ? :jruby : :mri),
-      :host=>ENV.fetch('DBHOST', '127.0.0.1'),
+      :host=>'tfb-database',
       :database=>'hello_world',
       :user=>'benchmarkdbuser',
       :password=>'benchmarkdbpass'

+ 0 - 7
frameworks/Ruby/rack-sequel/rack-sequel-base.dockerfile

@@ -1,7 +0,0 @@
-FROM techempower/ruby-2.4:0.1
-
-ADD ./ /rack-sequel
-
-WORKDIR /rack-sequel
-
-RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle

+ 0 - 12
frameworks/Ruby/rack-sequel/rack-sequel-jruby-base.dockerfile

@@ -1,12 +0,0 @@
-FROM techempower/jruby-9.1:0.1
-
-ADD ./ /rack-sequel
-
-WORKDIR /rack-sequel
-
-ENV THREAD_FACTOR=2
-
-RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle
-
-ENV DBTYPE=mysql
-CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production

+ 7 - 1
frameworks/Ruby/rack-sequel/rack-sequel-passenger-mri.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/rack-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /rack-sequel
+
+WORKDIR /rack-sequel
+
+RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle
 
 # TODO: https://github.com/phusion/passenger/issues/1916
 ENV _PASSENGER_FORCE_HTTP_SESSION=true

+ 7 - 1
frameworks/Ruby/rack-sequel/rack-sequel-postgres-passenger-mri.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/rack-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /rack-sequel
+
+WORKDIR /rack-sequel
+
+RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle
 
 # TODO: https://github.com/phusion/passenger/issues/1916
 ENV _PASSENGER_FORCE_HTTP_SESSION=true

+ 11 - 2
frameworks/Ruby/rack-sequel/rack-sequel-postgres-torquebox-jruby.dockerfile

@@ -1,4 +1,13 @@
-FROM techempower/rack-sequel-jruby-base:0.1
+FROM jruby:9.1
+
+ADD ./ /rack-sequel
+
+WORKDIR /rack-sequel
+
+ENV THREAD_FACTOR=2
+
+RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle
 
 ENV DBTYPE=postgresql
-CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production
+
+CMD export MAX_CONCURRENCY=$(( 2 * $(nproc) )) && bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production

+ 7 - 1
frameworks/Ruby/rack-sequel/rack-sequel-postgres-unicorn-mri.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/rack-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /rack-sequel
+
+WORKDIR /rack-sequel
+
+RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle
 
 ENV DBTYPE=postgresql
 CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production

+ 7 - 1
frameworks/Ruby/rack-sequel/rack-sequel-postgres.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/rack-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /rack-sequel
+
+WORKDIR /rack-sequel
+
+RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle
 
 ENV DBTYPE=postgresql
 CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production

+ 11 - 2
frameworks/Ruby/rack-sequel/rack-sequel-torquebox-jruby.dockerfile

@@ -1,4 +1,13 @@
-FROM techempower/rack-sequel-jruby-base:0.1
+FROM jruby:9.1
+
+ADD ./ /rack-sequel
+
+WORKDIR /rack-sequel
+
+ENV THREAD_FACTOR=2
+
+RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle
 
 ENV DBTYPE=mysql
-CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production
+
+CMD export MAX_CONCURRENCY=$(( 2 * $(nproc) )) && bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production

+ 7 - 1
frameworks/Ruby/rack-sequel/rack-sequel-unicorn-mri.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/rack-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /rack-sequel
+
+WORKDIR /rack-sequel
+
+RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle
 
 ENV DBTYPE=mysql
 CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production

+ 7 - 1
frameworks/Ruby/rack-sequel/rack-sequel.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/rack-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /rack-sequel
+
+WORKDIR /rack-sequel
+
+RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile --path=/rack-sequel/rack-sequel/bundle
 
 ENV DBTYPE=mysql
 CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production

+ 1 - 1
frameworks/Ruby/rack/config/nginx.conf

@@ -37,7 +37,7 @@ events {
 
 http {
   # nginx will find this file in the config directory set at nginx build time
-  include /nginx/conf/mime.types;
+  include /etc/nginx/mime.types;
 
   # fallback in case we can't determine a type
   default_type application/octet-stream;

+ 2 - 7
frameworks/Ruby/rack/rack-unicorn.dockerfile

@@ -1,11 +1,6 @@
-FROM techempower/nginx:0.1
+FROM ruby:2.4
 
-FROM techempower/ruby-2.4:0.1
-
-COPY --from=0 /nginx /nginx
-
-ENV NGINX_HOME="/nginx"
-ENV PATH=/nginx/sbin:${PATH}
+RUN apt update -yqq && apt install -yqq nginx
 
 ADD ./ /rack
 

+ 1 - 1
frameworks/Ruby/rack/rack.dockerfile

@@ -1,4 +1,4 @@
-FROM techempower/ruby-2.4:0.1
+FROM ruby:2.4
 
 ADD ./ /rack
 

+ 1 - 1
frameworks/Ruby/rails/config/nginx.conf

@@ -37,7 +37,7 @@ events {
 
 http {
   # nginx will find this file in the config directory set at nginx build time
-  include /nginx/conf/mime.types;
+  include /etc/nginx/mime.types;
 
   # fallback in case we can't determine a type
   default_type application/octet-stream;

+ 2 - 7
frameworks/Ruby/rails/rails-unicorn.dockerfile

@@ -1,11 +1,6 @@
-FROM techempower/nginx:0.1
+FROM ruby:2.4
 
-FROM techempower/ruby-2.4:0.1
-
-COPY --from=0 /nginx /nginx
-
-ENV NGINX_HOME="/nginx"
-ENV PATH=/nginx/sbin:${PATH}
+RUN apt update -yqq && apt install -yqq nginx
 
 ADD ./ /rails
 

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

@@ -1,4 +1,4 @@
-FROM techempower/ruby-2.4:0.1
+FROM ruby:2.4
 
 ADD ./ /rails
 

+ 1 - 1
frameworks/Ruby/roda-sequel/boot.rb

@@ -45,7 +45,7 @@ def connect(dbtype)
   Sequel.connect \
     '%{adapter}://%{host}/%{database}?user=%{user}&password=%{password}' % {
       :adapter=>adapters.fetch(dbtype).fetch(defined?(JRUBY_VERSION) ? :jruby : :mri),
-      :host=>ENV.fetch('DBHOST', '127.0.0.1'),
+      :host=>'tfb-database',
       :database=>'hello_world',
       :user=>'benchmarkdbuser',
       :password=>'benchmarkdbpass'

+ 0 - 7
frameworks/Ruby/roda-sequel/roda-sequel-base.dockerfile

@@ -1,7 +0,0 @@
-FROM techempower/ruby-2.4:0.1
-
-ADD ./ /roda-sequel
-
-WORKDIR /roda-sequel
-
-RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle

+ 0 - 12
frameworks/Ruby/roda-sequel/roda-sequel-jruby-base.dockerfile

@@ -1,12 +0,0 @@
-FROM techempower/jruby-9.1:0.1
-
-ADD ./ /roda-sequel
-
-WORKDIR /roda-sequel
-
-ENV THREAD_FACTOR=2
-
-RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle
-
-ENV DBTYPE=mysql
-CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production

+ 6 - 1
frameworks/Ruby/roda-sequel/roda-sequel-passenger-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/roda-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /roda-sequel
+WORKDIR /roda-sequel
+
+RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle
 
 # TODO: https://github.com/phusion/passenger/issues/1916
 ENV _PASSENGER_FORCE_HTTP_SESSION=true

+ 6 - 1
frameworks/Ruby/roda-sequel/roda-sequel-postgres-passenger-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/roda-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /roda-sequel
+WORKDIR /roda-sequel
+
+RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle
 
 # TODO: https://github.com/phusion/passenger/issues/1916
 ENV _PASSENGER_FORCE_HTTP_SESSION=true

+ 9 - 2
frameworks/Ruby/roda-sequel/roda-sequel-postgres-torquebox-jruby.dockerfile

@@ -1,4 +1,11 @@
-FROM techempower/roda-sequel-jruby-base:0.1
+FROM jruby:9.1
+
+ADD ./ /roda-sequel
+WORKDIR /roda-sequel
+
+ENV THREAD_FACTOR=2
+
+RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle
 
 ENV DBTYPE=postgresql
-CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production
+CMD export MAX_CONCURRENCY=$(( 2 * $(nproc) )) && bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production

+ 6 - 1
frameworks/Ruby/roda-sequel/roda-sequel-postgres-unicorn-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/roda-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /roda-sequel
+WORKDIR /roda-sequel
+
+RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle
 
 ENV DBTYPE=postgresql
 CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production

+ 6 - 1
frameworks/Ruby/roda-sequel/roda-sequel-postgres.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/roda-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /roda-sequel
+WORKDIR /roda-sequel
+
+RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle
 
 ENV DBTYPE=postgresql
 CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production

+ 9 - 2
frameworks/Ruby/roda-sequel/roda-sequel-torquebox-jruby.dockerfile

@@ -1,4 +1,11 @@
-FROM techempower/roda-sequel-jruby-base:0.1
+FROM jruby:9.1
+
+ADD ./ /roda-sequel
+WORKDIR /roda-sequel
+
+ENV THREAD_FACTOR=2
+
+RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle
 
 ENV DBTYPE=mysql
-CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production
+CMD export MAX_CONCURRENCY=$(( 2 * $(nproc) )) && bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production

+ 6 - 1
frameworks/Ruby/roda-sequel/roda-sequel-unicorn-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/roda-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /roda-sequel
+WORKDIR /roda-sequel
+
+RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle
 
 ENV DBTYPE=mysql
 CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production

+ 6 - 1
frameworks/Ruby/roda-sequel/roda-sequel.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/roda-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /roda-sequel
+WORKDIR /roda-sequel
+
+RUN bundle install --jobs=4 --gemfile=/roda-sequel/Gemfile --path=/roda-sequel/roda-sequel/bundle
 
 ENV DBTYPE=mysql
 CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production

+ 1 - 1
frameworks/Ruby/sinatra-sequel/boot.rb

@@ -45,7 +45,7 @@ def connect(dbtype)
   Sequel.connect \
     '%{adapter}://%{host}/%{database}?user=%{user}&password=%{password}' % {
       :adapter=>adapters.fetch(dbtype).fetch(defined?(JRUBY_VERSION) ? :jruby : :mri),
-      :host=>ENV.fetch('DBHOST', '127.0.0.1'),
+      :host=>'tfb-database',
       :database=>'hello_world',
       :user=>'benchmarkdbuser',
       :password=>'benchmarkdbpass'

+ 1 - 2
frameworks/Ruby/sinatra-sequel/sinatra-sequel-base.dockerfile

@@ -1,7 +1,6 @@
-FROM techempower/ruby-2.4:0.1
+FROM ruby:2.4
 
 ADD ./ /sinatra-sequel
-
 WORKDIR /sinatra-sequel
 
 RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle

+ 1 - 5
frameworks/Ruby/sinatra-sequel/sinatra-sequel-jruby-base.dockerfile

@@ -1,12 +1,8 @@
-FROM techempower/jruby-9.1:0.1
+FROM jruby:9.1
 
 ADD ./ /sinatra-sequel
-
 WORKDIR /sinatra-sequel
 
 ENV THREAD_FACTOR=2
 
 RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle
-
-ENV DBTYPE=mysql
-CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production

+ 6 - 1
frameworks/Ruby/sinatra-sequel/sinatra-sequel-passenger-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra-sequel
+WORKDIR /sinatra-sequel
+
+RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle
 
 # TODO: https://github.com/phusion/passenger/issues/1916
 ENV _PASSENGER_FORCE_HTTP_SESSION=true

+ 6 - 1
frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-passenger-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra-sequel
+WORKDIR /sinatra-sequel
+
+RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle
 
 # TODO: https://github.com/phusion/passenger/issues/1916
 ENV _PASSENGER_FORCE_HTTP_SESSION=true

+ 9 - 2
frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-torquebox-jruby.dockerfile

@@ -1,4 +1,11 @@
-FROM techempower/sinatra-sequel-jruby-base:0.1
+FROM jruby:9.1
+
+ADD ./ /sinatra-sequel
+WORKDIR /sinatra-sequel
+
+ENV THREAD_FACTOR=2
+
+RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle
 
 ENV DBTYPE=postgresql
-CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production
+CMD export MAX_CONCURRENCY=$(( 2 * $(nproc) )) && bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production

+ 6 - 1
frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres-unicorn-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra-sequel
+WORKDIR /sinatra-sequel
+
+RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle
 
 ENV DBTYPE=postgresql
 CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production

+ 6 - 1
frameworks/Ruby/sinatra-sequel/sinatra-sequel-postgres.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra-sequel
+WORKDIR /sinatra-sequel
+
+RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle
 
 ENV DBTYPE=postgresql
 CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production

+ 9 - 2
frameworks/Ruby/sinatra-sequel/sinatra-sequel-torquebox-jruby.dockerfile

@@ -1,4 +1,11 @@
-FROM techempower/sinatra-sequel-jruby-base:0.1
+FROM jruby:9.1
+
+ADD ./ /sinatra-sequel
+WORKDIR /sinatra-sequel
+
+ENV THREAD_FACTOR=2
+
+RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle
 
 ENV DBTYPE=mysql
-CMD bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production
+CMD export MAX_CONCURRENCY=$(( 2 * $(nproc) )) && bundle exec torquebox run --io-threads $(( MAX_CONCURRENCY / 2 )) --worker-threads $MAX_CONCURRENCY -b 0.0.0.0 -p 8080 -e production

+ 6 - 1
frameworks/Ruby/sinatra-sequel/sinatra-sequel-unicorn-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra-sequel
+WORKDIR /sinatra-sequel
+
+RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle
 
 ENV DBTYPE=mysql
 CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production

+ 6 - 1
frameworks/Ruby/sinatra-sequel/sinatra-sequel.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-sequel-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra-sequel
+WORKDIR /sinatra-sequel
+
+RUN bundle install --jobs=4 --gemfile=/sinatra-sequel/Gemfile --path=/sinatra-sequel/sinatra-sequel/bundle
 
 ENV DBTYPE=mysql
 CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production

+ 1 - 1
frameworks/Ruby/sinatra/boot.rb

@@ -27,7 +27,7 @@ def connect(dbtype)
     :adapter=>(dbtype == :mysql ? 'mysql2' : 'postgresql'),
     :username=>'benchmarkdbuser',
     :password=>'benchmarkdbpass',
-    :host=>ENV.fetch('DBHOST', '127.0.0.1'),
+    :host=>'tfb-database',
     :database=>'hello_world'
   }
 

+ 0 - 7
frameworks/Ruby/sinatra/sinatra-base.dockerfile

@@ -1,7 +0,0 @@
-FROM techempower/ruby-2.4:0.1
-
-ADD ./ /sinatra
-
-WORKDIR /sinatra
-
-RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile --path=/sinatra/sinatra/bundle

+ 6 - 1
frameworks/Ruby/sinatra/sinatra-passenger-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra
+WORKDIR /sinatra
+
+RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile --path=/sinatra/sinatra/bundle
 
 # TODO: https://github.com/phusion/passenger/issues/1916
 ENV _PASSENGER_FORCE_HTTP_SESSION=true

+ 6 - 1
frameworks/Ruby/sinatra/sinatra-postgres-passenger-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra
+WORKDIR /sinatra
+
+RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile --path=/sinatra/sinatra/bundle
 
 # TODO: https://github.com/phusion/passenger/issues/1916
 ENV _PASSENGER_FORCE_HTTP_SESSION=true

+ 6 - 1
frameworks/Ruby/sinatra/sinatra-postgres-unicorn-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra
+WORKDIR /sinatra
+
+RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile --path=/sinatra/sinatra/bundle
 
 ENV DBTYPE=postgresql
 CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production

+ 6 - 1
frameworks/Ruby/sinatra/sinatra-postgres.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra
+WORKDIR /sinatra
+
+RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile --path=/sinatra/sinatra/bundle
 
 ENV DBTYPE=postgresql
 CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production

+ 6 - 1
frameworks/Ruby/sinatra/sinatra-unicorn-mri.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra
+WORKDIR /sinatra
+
+RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile --path=/sinatra/sinatra/bundle
 
 ENV DBTYPE=mysql
 CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production

+ 6 - 1
frameworks/Ruby/sinatra/sinatra.dockerfile

@@ -1,4 +1,9 @@
-FROM techempower/sinatra-base:0.1
+FROM ruby:2.4
+
+ADD ./ /sinatra
+WORKDIR /sinatra
+
+RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile --path=/sinatra/sinatra/bundle
 
 ENV DBTYPE=mysql
 CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production

+ 0 - 10
toolset/setup/docker/languages/jruby-9.1.dockerfile

@@ -1,10 +0,0 @@
-FROM techempower/java:0.1
-
-WORKDIR /
-
-RUN wget -q https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.1.16.0/jruby-dist-9.1.16.0-bin.tar.gz
-RUN tar xf jruby-dist-9.1.16.0-bin.tar.gz
-
-ENV PATH=/jruby-9.1.16.0/bin:${PATH}
-
-RUN jruby -S gem install bundler -v 1.15.4

+ 0 - 21
toolset/setup/docker/languages/ruby-2.4.dockerfile

@@ -1,21 +0,0 @@
-FROM techempower/base:0.1
-
-RUN apt install -yqq llvm-dev libjemalloc-dev zlib1g-dev libssl-dev libcurl4-openssl-dev bison
-
-ENV RUBY_VERSION 2.4.2
-ENV RUBY_GEMS 2.6.12
-
-RUN cd /usr/local/src && \
-    wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-${RUBY_VERSION}.tar.gz && \
-    tar zxvf ruby-${RUBY_VERSION}.tar.gz && \
-    cd ruby-${RUBY_VERSION} && \
-    ./configure && \
-    make && \
-    make install
-
-RUN wget https://rubygems.org/rubygems/rubygems-${RUBY_GEMS}.tgz && \
-    tar zxvf rubygems-${RUBY_GEMS}.tgz && \
-    cd rubygems-${RUBY_GEMS} && \
-    /usr/local/bin/ruby setup.rb
-
-RUN gem install bundler --no-ri --no-rdoc