From 1943b8446fb7108d3628de40545a1e03c8efb165 Mon Sep 17 00:00:00 2001 From: Riccardo Graziosi Date: Thu, 7 Apr 2022 16:31:57 +0200 Subject: [PATCH] Bump ruby to 2.6.6 and speed up docker build --- .ruby-version | 2 +- Gemfile | 19 +++++++------------ Gemfile.lock | 17 ++++++++--------- config/webpacker.yml | 2 +- docker/app/Dockerfile | 4 ++-- 5 files changed, 19 insertions(+), 25 deletions(-) diff --git a/.ruby-version b/.ruby-version index 4560fb91..f6ab44e9 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.6.3 +ruby-2.6.6 diff --git a/Gemfile b/Gemfile index 9bf388b2..ab1855d9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,24 +1,22 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '2.6.3' +ruby '2.6.6' -# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '6.0.4.7' -# Use postgresql as the database for Active Record + gem 'pg', '>= 0.18', '< 2.0' -# Use Puma as the app server + gem 'puma', '~> 4.3' -# Use SCSS for stylesheets gem 'sass-rails', '~> 5' -# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker +gem 'sassc', '2.1.0' # temporarely, because 2.4.0 takes 5 minutes to install... + gem 'webpacker', '~> 4.0' -# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks + gem 'turbolinks', '~> 5' -# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder + gem 'jbuilder', '~> 2.7' -# Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.4.2', require: false # Authentication @@ -34,7 +32,6 @@ gem 'react-rails', '~> 2.6.0' gem 'kaminari', '~> 1.2.1' group :development, :test do - # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] gem 'rspec-rails', '~> 3.8.2' @@ -42,10 +39,8 @@ group :development, :test do end group :development do - # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'web-console', '>= 3.3.0' gem 'listen', '>= 3.0.5', '< 3.2' - # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end diff --git a/Gemfile.lock b/Gemfile.lock index f05fb86c..dc8404ce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -135,7 +135,7 @@ GEM rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) - loofah (2.15.0) + loofah (2.16.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -144,17 +144,15 @@ GEM matrix (0.4.2) method_source (1.0.0) mini_mime (1.1.2) - mini_portile2 (2.8.0) minitest (5.15.0) momentjs-rails (2.29.1.1) railties (>= 3.1) - msgpack (1.4.5) + msgpack (1.5.1) nio4r (2.5.8) - nokogiri (1.13.3) - mini_portile2 (~> 2.8.0) + nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) orm_adapter (0.5.0) - pg (1.3.4) + pg (1.3.5) public_suffix (4.0.6) puma (4.3.12) nio4r (~> 2.0) @@ -194,7 +192,7 @@ GEM rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) - react-rails (2.6.1) + react-rails (2.6.2) babel-transpiler (>= 0.7.0) connection_pool execjs @@ -235,7 +233,7 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sassc (2.4.0) + sassc (2.1.0-x86_64-linux) ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) @@ -308,6 +306,7 @@ DEPENDENCIES react-rails (~> 2.6.0) rspec-rails (~> 3.8.2) sass-rails (~> 5) + sassc (= 2.1.0) selenium-webdriver spring spring-watcher-listen (~> 2.0.0) @@ -318,7 +317,7 @@ DEPENDENCIES webpacker (~> 4.0) RUBY VERSION - ruby 2.6.3p62 + ruby 2.6.6p146 BUNDLED WITH 1.17.2 diff --git a/config/webpacker.yml b/config/webpacker.yml index 25c3ce06..a970c66e 100644 --- a/config/webpacker.yml +++ b/config/webpacker.yml @@ -56,7 +56,7 @@ development: compile: true # Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules - check_yarn_integrity: true + check_yarn_integrity: false # Reference: https://webpack.js.org/configuration/dev-server/ dev_server: diff --git a/docker/app/Dockerfile b/docker/app/Dockerfile index 19d2371b..94a99758 100644 --- a/docker/app/Dockerfile +++ b/docker/app/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.6.3 +FROM ruby:2.6.6 RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get update -qq && apt-get install -y nodejs postgresql-client @@ -18,7 +18,7 @@ WORKDIR ${APP_ROOT} RUN gem install foreman # Copy Gemfile and install gems -COPY Gemfile* ${APP_ROOT}/ +COPY Gemfile Gemfile.lock ${APP_ROOT}/ RUN bundle install # Copy package.json and install packages