From 7355643f1c07882fe4fa4f81f360339caa2bcba6 Mon Sep 17 00:00:00 2001 From: Alex Koval Date: Sun, 15 Dec 2024 13:48:06 +0100 Subject: [PATCH] update dependecies --- .dockerdev/Dockerfile | 4 +- .github/workflows/ci.yml | 8 +- Gemfile | 4 +- Gemfile.lock | 382 +++++++++++++++++++-------------------- config/deploy.yml | 10 +- db/schema.rb | 2 +- dependencies.sh | 68 ++++--- docker-compose.yml | 12 +- 8 files changed, 257 insertions(+), 233 deletions(-) mode change 100644 => 100755 dependencies.sh diff --git a/.dockerdev/Dockerfile b/.dockerdev/Dockerfile index 1f4ce3f..abb4a4b 100644 --- a/.dockerdev/Dockerfile +++ b/.dockerdev/Dockerfile @@ -1,5 +1,5 @@ ARG RUBY_VERSION -FROM ruby:$RUBY_VERSION-slim-buster +FROM ruby:$RUBY_VERSION-slim-bookworm ARG PG_MAJOR ARG NODE_MAJOR @@ -35,7 +35,7 @@ RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get -yq dist-upgrad # Add PostgreSQL to sources list RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ - && echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list + && echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list # Add NodeJS to sources list RUN curl -sL https://deb.nodesource.com/setup_$NODE_MAJOR.x | bash - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2050ef..7beab62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,11 +6,11 @@ jobs: name: Tests runs-on: ubuntu-latest container: - image: ruby:3.2.2 + image: ruby:3.3.6 services: postgres: - image: postgres:15.0 + image: postgres:17 env: POSTGRES_PASSWORD: postgres ports: @@ -22,7 +22,7 @@ jobs: --health-retries 5 redis: - image: redis:7.0 + image: redis:6.2 options: >- --health-cmd "redis-cli ping" --health-interval 10s @@ -58,7 +58,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version: 20 + node-version: 22 - name: Install yarn run: npm install -g yarn diff --git a/Gemfile b/Gemfile index 1832baa..9bea40f 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "3.2.2" +ruby "3.3.6" gem "bootsnap", require: false gem "bundler-audit" @@ -24,7 +24,7 @@ gem "sidekiq-scheduler" gem "strong_migrations" group :development, :test do - gem "bullet", "~> 7.1.3" + gem "bullet", "~> 8.0.0" gem "debug" gem "factory_bot_rails" gem "faker" diff --git a/Gemfile.lock b/Gemfile.lock index 493b14f..284cd58 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,84 +1,83 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.1.1) - actionpack (= 7.1.1) - activesupport (= 7.1.1) + actioncable (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.1) - actionpack (= 7.1.1) - activejob (= 7.1.1) - activerecord (= 7.1.1) - activestorage (= 7.1.1) - activesupport (= 7.1.1) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.1.1) - actionpack (= 7.1.1) - actionview (= 7.1.1) - activejob (= 7.1.1) - activesupport (= 7.1.1) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp + actionmailbox (7.2.2.1) + actionpack (= 7.2.2.1) + activejob (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) + mail (>= 2.8.0) + actionmailer (7.2.2.1) + actionpack (= 7.2.2.1) + actionview (= 7.2.2.1) + activejob (= 7.2.2.1) + activesupport (= 7.2.2.1) + mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.1.1) - actionview (= 7.1.1) - activesupport (= 7.1.1) + actionpack (7.2.2.1) + actionview (= 7.2.2.1) + activesupport (= 7.2.2.1) nokogiri (>= 1.8.5) - rack (>= 2.2.4) + racc + rack (>= 2.2.4, < 3.2) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.1) - actionpack (= 7.1.1) - activerecord (= 7.1.1) - activestorage (= 7.1.1) - activesupport (= 7.1.1) + useragent (~> 0.16) + actiontext (7.2.2.1) + actionpack (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.1) - activesupport (= 7.1.1) + actionview (7.2.2.1) + activesupport (= 7.2.2.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.1) - activesupport (= 7.1.1) + activejob (7.2.2.1) + activesupport (= 7.2.2.1) globalid (>= 0.3.6) - activemodel (7.1.1) - activesupport (= 7.1.1) - activerecord (7.1.1) - activemodel (= 7.1.1) - activesupport (= 7.1.1) + activemodel (7.2.2.1) + activesupport (= 7.2.2.1) + activerecord (7.2.2.1) + activemodel (= 7.2.2.1) + activesupport (= 7.2.2.1) timeout (>= 0.4.0) - activestorage (7.1.1) - actionpack (= 7.1.1) - activejob (= 7.1.1) - activerecord (= 7.1.1) - activesupport (= 7.1.1) + activestorage (7.2.2.1) + actionpack (= 7.2.2.1) + activejob (= 7.2.2.1) + activerecord (= 7.2.2.1) + activesupport (= 7.2.2.1) marcel (~> 1.0) - activesupport (7.1.1) + activesupport (7.2.2.1) base64 + benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - addressable (2.8.5) - public_suffix (>= 2.0.2, < 6.0) - annotaterb (4.11.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + annotaterb (4.13.0) ast (2.4.2) base64 (0.2.0) + benchmark (0.4.0) better_html (2.1.1) actionview (>= 6.0) activesupport (>= 6.0) @@ -86,98 +85,99 @@ GEM erubi (~> 1.4) parser (>= 2.4) smart_properties - bigdecimal (3.1.4) + bigdecimal (3.1.8) bindex (0.8.1) - bootsnap (1.17.0) + bootsnap (1.18.4) msgpack (~> 1.2) - builder (3.2.4) - bullet (7.1.3) + builder (3.3.0) + bullet (8.0.0) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) - bundler-audit (0.9.1) + bundler-audit (0.9.2) bundler (>= 1.2.0, < 3) thor (~> 1.0) - capybara (3.39.2) + capybara (3.40.0) addressable matrix mini_mime (>= 0.1.3) - nokogiri (~> 1.8) + nokogiri (~> 1.11) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) colorize (1.1.0) - concurrent-ruby (1.2.2) + concurrent-ruby (1.3.4) connection_pool (2.4.1) counter_culture (2.9.0) activerecord (>= 4.2) activesupport (>= 4.2) - crack (0.4.5) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) - cuprite (0.15) + cuprite (0.15.1) capybara (~> 3.0) - ferrum (~> 0.14.0) - database_cleaner-active_record (2.1.0) + ferrum (~> 0.15.0) + database_cleaner-active_record (2.2.0) activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) - date (3.3.4) - debug (1.8.0) - irb (>= 1.5.0) - reline (>= 0.3.1) - diff-lcs (1.5.0) - docile (1.4.0) - drb (2.2.0) - ruby2_keywords - erb_lint (0.6.0) + date (3.4.1) + debug (1.9.2) + irb (~> 1.10) + reline (>= 0.3.8) + diff-lcs (1.5.1) + docile (1.4.1) + drb (2.2.1) + erb_lint (0.7.0) activesupport better_html (>= 2.0.1) parser (>= 2.7.1.4) rainbow rubocop (>= 1) smart_properties - erubi (1.12.0) - et-orbi (1.2.7) + erubi (1.13.0) + et-orbi (1.2.11) tzinfo - factory_bot (6.2.1) + factory_bot (6.5.0) activesupport (>= 5.0.0) - factory_bot_rails (6.2.0) - factory_bot (~> 6.2.0) + factory_bot_rails (6.4.4) + factory_bot (~> 6.5) railties (>= 5.0.0) - faker (3.2.2) + faker (3.5.1) i18n (>= 1.8.11, < 2) - ferrum (0.14) + ferrum (0.15) addressable (~> 2.5) concurrent-ruby (~> 1.1) webrick (~> 1.7) - websocket-driver (>= 0.6, < 0.8) - ffi (1.16.3) - fugit (1.9.0) - et-orbi (~> 1, >= 1.2.7) + websocket-driver (~> 0.7) + ffi (1.17.0-x86_64-linux-gnu) + fugit (1.11.1) + et-orbi (~> 1, >= 1.2.11) raabro (~> 1.4) globalid (1.2.1) activesupport (>= 6.1) - hashdiff (1.0.1) - hotwire-livereload (1.3.0) + hashdiff (1.1.2) + hotwire-livereload (1.4.1) actioncable (>= 6.0.0) listen (>= 3.0.0) railties (>= 6.0.0) - i18n (1.14.1) + i18n (1.14.6) concurrent-ruby (~> 1.0) - io-console (0.6.0) - irb (1.8.3) - rdoc - reline (>= 0.3.8) - jsbundling-rails (1.2.1) + io-console (0.8.0) + irb (1.14.2) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + jsbundling-rails (1.3.1) railties (>= 6.0.0) - json (2.6.3) + json (2.9.0) language_server-protocol (3.17.0.3) lint_roller (1.1.0) - listen (3.8.0) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.21.4) + logger (1.6.3) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -185,96 +185,95 @@ GEM net-imap net-pop net-smtp - marcel (1.0.2) + marcel (1.0.4) matrix (0.4.2) mini_mime (1.1.5) - minitest (5.20.0) - msgpack (1.7.2) - mutex_m (0.2.0) - net-imap (0.4.4) + minitest (5.25.4) + msgpack (1.7.5) + net-imap (0.5.1) date net-protocol net-pop (0.1.2) net-protocol net-protocol (0.2.2) timeout - net-smtp (0.4.0) + net-smtp (0.5.0) net-protocol - nio4r (2.5.9) - nokogiri (1.15.4-x86_64-linux) + nio4r (2.7.4) + nokogiri (1.17.2-x86_64-linux) racc (~> 1.4) - parallel (1.23.0) - parser (3.2.2.4) + parallel (1.26.3) + parser (3.3.6.0) ast (~> 2.4.1) racc - pg (1.5.4) - psych (5.1.1.1) + pg (1.5.9) + psych (5.2.1) + date stringio - public_suffix (5.0.3) - puma (6.4.0) + public_suffix (6.0.1) + puma (6.5.0) nio4r (~> 2.0) raabro (1.4.0) - racc (1.7.3) - rack (3.0.8) + racc (1.8.1) + rack (3.1.8) rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rackup (2.1.0) + rackup (2.2.1) rack (>= 3) - webrick (~> 1.8) - rails (7.1.1) - actioncable (= 7.1.1) - actionmailbox (= 7.1.1) - actionmailer (= 7.1.1) - actionpack (= 7.1.1) - actiontext (= 7.1.1) - actionview (= 7.1.1) - activejob (= 7.1.1) - activemodel (= 7.1.1) - activerecord (= 7.1.1) - activestorage (= 7.1.1) - activesupport (= 7.1.1) + rails (7.2.2.1) + actioncable (= 7.2.2.1) + actionmailbox (= 7.2.2.1) + actionmailer (= 7.2.2.1) + actionpack (= 7.2.2.1) + actiontext (= 7.2.2.1) + actionview (= 7.2.2.1) + activejob (= 7.2.2.1) + activemodel (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) bundler (>= 1.15.0) - railties (= 7.1.1) + railties (= 7.2.2.1) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) - nokogiri (~> 1.14) - railties (7.1.1) - actionpack (= 7.1.1) - activesupport (= 7.1.1) - irb + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) + irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.1.0) + rake (13.2.1) rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) - rdoc (6.6.0) + rdoc (6.9.0) psych (>= 4.0.0) redis (4.8.1) - redis-client (0.18.0) + redis-client (0.23.0) connection_pool - regexp_parser (2.8.2) - reline (0.4.0) + regexp_parser (2.9.3) + reline (0.5.12) io-console (~> 0.5) - rexml (3.2.6) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + rexml (3.4.0) + rspec-core (3.13.2) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.6) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-rails (6.0.3) + rspec-support (~> 3.13.0) + rspec-rails (6.0.4) actionpack (>= 6.1) activesupport (>= 6.1) railties (>= 6.1) @@ -282,98 +281,99 @@ GEM rspec-expectations (~> 3.12) rspec-mocks (~> 3.12) rspec-support (~> 3.12) - rspec-support (3.12.1) - rubocop (1.57.2) + rspec-support (3.13.2) + rubocop (1.69.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.4) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.36.2, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) - rubocop-performance (1.19.1) - rubocop (>= 1.7.0, < 2.0) - rubocop-ast (>= 0.4.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.37.0) + parser (>= 3.3.1.0) + rubocop-performance (1.23.0) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) - ruby2_keywords (0.0.5) - rufus-scheduler (3.9.1) - fugit (~> 1.1, >= 1.1.6) + rufus-scheduler (3.9.2) + fugit (~> 1.1, >= 1.11.1) + securerandom (0.4.0) shoulda-matchers (5.3.0) activesupport (>= 5.2.0) - sidekiq (7.2.0) - concurrent-ruby (< 2) + sidekiq (7.3.6) connection_pool (>= 2.3.0) + logger rack (>= 2.2.4) - redis-client (>= 0.14.0) - sidekiq-scheduler (5.0.3) + redis-client (>= 0.22.2) + sidekiq-scheduler (5.0.6) rufus-scheduler (~> 3.2) sidekiq (>= 6, < 8) - tilt (>= 1.4.0) + tilt (>= 1.4.0, < 3) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) smart_properties (1.17.0) sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) - standard (1.32.0) + standard (1.43.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.57.2) + rubocop (~> 1.69.1) standard-custom (~> 1.0.0) - standard-performance (~> 1.2) + standard-performance (~> 1.6) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.2.1) + standard-performance (1.6.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.19.1) - stimulus-rails (1.3.0) + rubocop-performance (~> 1.23.0) + stimulus-rails (1.3.4) railties (>= 6.0.0) - stringio (3.0.9) - strong_migrations (2.0.0) + stringio (3.1.2) + strong_migrations (2.1.0) activerecord (>= 6.1) - tailwindcss-rails (2.0.32-x86_64-linux) - railties (>= 6.0.0) - thor (1.3.0) - tilt (2.3.0) - timeout (0.4.1) - turbo-rails (1.5.0) + tailwindcss-rails (2.7.9-x86_64-linux) + railties (>= 7.0.0) + thor (1.3.2) + tilt (2.4.0) + timeout (0.4.2) + turbo-rails (2.0.11) actionpack (>= 6.0.0) - activejob (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) + unicode-display_width (3.1.2) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) uniform_notifier (1.16.0) + useragent (0.16.11) web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.19.1) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.8.1) + webrick (1.9.1) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.12) + zeitwerk (2.7.1) PLATFORMS x86_64-linux @@ -381,7 +381,7 @@ PLATFORMS DEPENDENCIES annotaterb bootsnap - bullet (~> 7.1.3) + bullet (~> 8.0.0) bundler-audit capybara colorize @@ -413,7 +413,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 3.2.2p53 + ruby 3.3.6p108 BUNDLED WITH 2.4.10 diff --git a/config/deploy.yml b/config/deploy.yml index bd27a26..931eb2c 100644 --- a/config/deploy.yml +++ b/config/deploy.yml @@ -21,9 +21,9 @@ builder: remote: arch: amd64 args: - RUBY_VERSION: '3.2.2' - NODE_VERSION: '18.12.0' - YARN_VERSION: '1.22.15' + RUBY_VERSION: '3.3.6' + NODE_VERSION: 22 + YARN_VERSION: '1.22.22' RAILS_ENV: production env: @@ -36,7 +36,7 @@ env: accessories: postgres: - image: postgres:15.0 + image: postgres:17 host: <%= ENV["DEPLOY_HOST"] %> port: 5432 env: @@ -47,7 +47,7 @@ accessories: directories: - pg_data:/var/lib/postgresql/data redis: - image: redis:7.0 + image: redis:6.2 host: <%= ENV["DEPLOY_HOST"] %> cmd: redis-server --requirepass <%= ENV["REDIS_PASSWORD"] %> --replica-read-only no env: diff --git a/db/schema.rb b/db/schema.rb index f913998..83701a2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 0) do +ActiveRecord::Schema[7.2].define(version: 0) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/dependencies.sh b/dependencies.sh old mode 100644 new mode 100755 index 0b59782..e572951 --- a/dependencies.sh +++ b/dependencies.sh @@ -1,11 +1,33 @@ #!/bin/bash -ruby_version=3.2.2 -node_version=14 -yarn_version=1.22.15 -postgres_version=13.0 +ruby_version=3.3.6 +node_version=22 +yarn_version=1.22.22 +postgres_major=17 +postgres_version=17.0 redis_version=6.2 -bundler_version=2.4.10 +bundler_version=2.5.0 + +platform='' +case "$OSTYPE" in + darwin*) platform="OSX" ;; + linux*) platform="LINUX" ;; + bsd*) platform="BSD" ;; + *) platform="unsupported" ;; +esac + +if [ "$platform" == "unsupported" ]; then + echo "Unsupported platform" + exit 1 +fi + +replace_occurrences() { + if [ "$platform" == "OSX" ]; then + sed -i "" "$1" "$2" + else + sed -i "$1" "$2" + fi +} update_versions() { update_ruby_versions @@ -18,43 +40,45 @@ update_versions() { rebuild_images() { docker compose down - docker rmi $(docker images 'lightning-rails' -a -q) -f + docker rmi $(docker images 'lightning-rails' -a -q) -f docker compose build runner make install } update_ruby_versions() { - sed -i "s/ruby \".*\"/ruby \"$ruby_version\"/g" Gemfile - sed -i "s/RUBY_VERSION: '.*'/RUBY_VERSION: '$ruby_version'/g" docker-compose.yml - sed -i "s/ruby-version: '.*'/ruby-version: '$ruby_version'/g" .github/workflows/verify.yml - sed -i "s/RUBY_VERSION: '.*'/RUBY_VERSION: '$ruby_version'/g" config/deploy.yml + replace_occurrences "s/ruby \".*\"/ruby \"$ruby_version\"/g" Gemfile + replace_occurrences "s/RUBY_VERSION: '.*'/RUBY_VERSION: '$ruby_version'/g" docker-compose.yml + replace_occurrences "s/ruby:.*/ruby:$ruby_version/g" .github/workflows/ci.yml + replace_occurrences "s/ruby-version: .*/ruby-version: $ruby_version/g" .github/workflows/ci.yml + replace_occurrences "s/RUBY_VERSION: '.*'/RUBY_VERSION: '$ruby_version'/g" config/deploy.yml } update_node_versions() { - sed -i "s/NODE_MAJOR: '.*'/NODE_MAJOR: '$node_version'/g" docker-compose.yml - sed -i "s/node-version: '.*'/node-version: '$node_version'/g" .github/workflows/verify.yml - sed -i "s/NODE_VERSION: '.*'/NODE_VERSION: '$node_version'/g" config/deploy.yml + replace_occurrences "s/NODE_MAJOR: '.*'/NODE_MAJOR: $node_version/g" docker-compose.yml + replace_occurrences "s/node-version: .*/node-version: $node_version/g" .github/workflows/ci.yml + replace_occurrences "s/NODE_VERSION: .*/NODE_VERSION: $node_version/g" config/deploy.yml } update_yarn_versions() { - sed -i "s/YARN_VERSION: '.*'/YARN_VERSION: '$yarn_version'/g" docker-compose.yml - sed -i "s/YARN_VERSION: '.*'/YARN_VERSION: '$yarn_version'/g" config/deploy.yml + replace_occurrences "s/YARN_VERSION: '.*'/YARN_VERSION: '$yarn_version'/g" docker-compose.yml + replace_occurrences "s/YARN_VERSION: '.*'/YARN_VERSION: '$yarn_version'/g" config/deploy.yml } update_postgres_versions() { - sed -i "s/POSTGRES_VERSION: '.*'/POSTGRES_VERSION: '$postgres_version'/g" docker-compose.yml - sed -i "s/image: postgres:.*/image: postgres:$postgres_version/g" .github/workflows/verify.yml - sed -i "s/image: postgres:.*/image: postgres:$postgres_version/g" config/deploy.yml + replace_occurrences "s/image: postgres:.*/image: postgres:$postgres_version/g" docker-compose.yml + replace_occurrences "s/image: postgres:.*/image: postgres:$postgres_version/g" .github/workflows/ci.yml + replace_occurrences "s/image: postgres:.*/image: postgres:$postgres_version/g" config/deploy.yml + replace_occurrences "s/PG_MAJOR: '.*'/PG_MAJOR: $postgres_major/g" docker-compose.yml } update_redis_versions() { - sed -i "s/REDIS_VERSION: '.*'/REDIS_VERSION: '$redis_version'/g" docker-compose.yml - sed -i "s/image: redis:.*/image: redis:$redis_version/g" .github/workflows/verify.yml - sed -i "s/image: redis:.*/image: redis:$redis_version/g" config/deploy.yml + replace_occurrences "s/REDIS_VERSION: '.*'/REDIS_VERSION: '$redis_version'/g" docker-compose.yml + replace_occurrences "s/image: redis:.*/image: redis:$redis_version/g" .github/workflows/ci.yml + replace_occurrences "s/image: redis:.*/image: redis:$redis_version/g" config/deploy.yml } update_bundler_versions() { - sed -i "s/BUNDLER_VERSION: '.*'/BUNDLER_VERSION: '$bundler_version'/g" docker-compose.yml + replace_occurrences "s/BUNDLER_VERSION: '.*'/BUNDLER_VERSION: '$bundler_version'/g" docker-compose.yml } update_versions diff --git a/docker-compose.yml b/docker-compose.yml index 7ecf7b3..a2c2aeb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,11 +3,11 @@ x-app: &app context: .dockerdev dockerfile: Dockerfile args: - RUBY_VERSION: '3.2.2' - PG_MAJOR: '13' - BUNDLER_VERSION: '2.4.10' - NODE_MAJOR: '14' - YARN_VERSION: '1.22.15' + RUBY_VERSION: '3.3.6' + PG_MAJOR: 17 + BUNDLER_VERSION: '2.5.0' + NODE_MAJOR: 20 + YARN_VERSION: '1.22.22' environment: &env NODE_ENV: ${NODE_ENV:-development} RAILS_ENV: ${RAILS_ENV:-development} @@ -74,7 +74,7 @@ services: command: bundle exec sidekiq -C config/sidekiq.yml postgres: - image: postgres:13.0 + image: postgres:17 volumes: - .dockerdev/.psqlrc:/root/.psqlrc:ro - postgres:/var/lib/postgresql/data