From fc6373b9e3aa5fd776add493726e3e75f85ab608 Mon Sep 17 00:00:00 2001 From: compwron Date: Tue, 6 May 2025 17:47:25 -0700 Subject: [PATCH 1/4] upgrade from ruby 3.3.6 3.3.8 --- .devcontainer/post-create.sh | 4 ++-- .ruby-version | 2 +- .tool-versions | 3 +-- Dockerfile | 4 ++-- Gemfile | 2 +- Gemfile.lock | 2 +- flake.nix | 2 +- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 8562cd08ce..d0adce7c34 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -3,9 +3,9 @@ RUBY_VERSION="$(cat .ruby-version | tr -d '\n')" # copy the file only if it doesn't already exist cp -n .devcontainer/.env.codespaces .env -# If the project's required ruby version changes from 3.3.6, this command +# If the project's required ruby version changes from 3.3.8, this command # will download and compile the correct version, but it will take a long time. -if [ "$RUBY_VERSION" != "3.3.6" ]; then +if [ "$RUBY_VERSION" != "3.3.8" ]; then rvm install $RUBY_VERSION rvm use $RUBY_VERSION echo "Ruby $RUBY_VERSION installed" diff --git a/.ruby-version b/.ruby-version index 9c25013dbb..37d02a6e38 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.6 +3.3.8 diff --git a/.tool-versions b/.tool-versions index d456c12329..5978c12138 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,2 @@ -ruby 3.3.6 -npm 11.0.0 +ruby 3.3.8 nodejs 22.11.0 diff --git a/Dockerfile b/Dockerfile index 494e6b680d..3f20ae721c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3.6-alpine AS builder +FROM ruby:3.3.8-alpine AS builder RUN apk update && apk upgrade && apk add --update --no-cache \ build-base \ @@ -14,7 +14,7 @@ RUN bundle install ### BUILD STEP DONE ### -FROM ruby:3.3.6-alpine +FROM ruby:3.3.8-alpine ARG RAILS_ROOT=/usr/src/app/ diff --git a/Gemfile b/Gemfile index d143798afb..f4ca6874cd 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -ruby "3.3.6" +ruby "3.3.8" gem "rails", "~> 7.2" gem "after_party" # post-deployment tasks diff --git a/Gemfile.lock b/Gemfile.lock index f8cf1996f9..f00d8b3335 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -735,7 +735,7 @@ DEPENDENCIES wicked RUBY VERSION - ruby 3.3.6p108 + ruby 3.3.8p144 BUNDLED WITH 2.6.6 diff --git a/flake.nix b/flake.nix index 8b997db405..6aecc1da9e 100644 --- a/flake.nix +++ b/flake.nix @@ -39,7 +39,7 @@ gemConfig = { }; # See available versions here: https://github.com/bobvanderlinden/nixpkgs-ruby/blob/master/ruby/versions.json - ruby = pkgs."ruby-3.3.6"; + ruby = pkgs."ruby-3.3.8"; bundixcli = bundix.packages.${system}.default; in rec { From 93918f2f78a9475f610b4adecc3e2d801e3364ff Mon Sep 17 00:00:00 2001 From: compwron Date: Tue, 6 May 2025 23:05:34 -0700 Subject: [PATCH 2/4] getting docker building better --- Dockerfile | 11 ++++++++--- Gemfile.lock | 10 +++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3f20ae721c..a0f660f4e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,14 +24,19 @@ RUN apk update && apk upgrade && apk add --update --no-cache \ imagemagick \ postgresql-client \ tzdata \ - vim && rm -rf /var/cache/apk/* -# The ruby alpine image's apk doesn't have the current version of node -RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ nodejs npm + vim \ + nodejs \ + npm \ + && rm -rf /var/cache/apk/* + +RUN echo "NodeJS Version:" "$(node -v)" +RUN echo "NPM Version:" "$(npm -v)" WORKDIR $RAILS_ROOT COPY . . RUN npm install --global npm +RUN npm --version RUN npm install RUN npm run build && npm run build:css diff --git a/Gemfile.lock b/Gemfile.lock index f00d8b3335..fd23c5ca16 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -233,10 +233,10 @@ GEM faraday-retry (1.0.3) faraday_middleware (1.2.1) faraday (~> 1.0) - ffi (1.17.1) - ffi (1.17.1-arm64-darwin) - ffi (1.17.1-x86_64-darwin) - ffi (1.17.1-x86_64-linux-gnu) + ffi (1.17.2) + ffi (1.17.2-arm64-darwin) + ffi (1.17.2-x86_64-darwin) + ffi (1.17.2-x86_64-linux-gnu) filterrific (5.2.7) flipper (1.3.4) concurrent-ruby (< 2) @@ -319,7 +319,7 @@ GEM marcel (1.0.4) matrix (0.4.2) method_source (1.1.0) - mini_magick (5.1.2) + mini_magick (5.2.0) benchmark logger mini_mime (1.1.5) From a28f57046e70c70d2d6bcbffdb4a7ba73a10dfb2 Mon Sep 17 00:00:00 2001 From: compwron Date: Tue, 6 May 2025 23:25:40 -0700 Subject: [PATCH 3/4] trying to unbreak docker --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a0f660f4e0..56fe0d23b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,15 +18,20 @@ FROM ruby:3.3.8-alpine ARG RAILS_ROOT=/usr/src/app/ +# available: https://pkgs.alpinelinux.org/packages RUN apk update && apk upgrade && apk add --update --no-cache \ bash \ + build-base \ curl \ imagemagick \ + libffi-dev \ + perl-yaml-libyaml \ + linux-headers \ + nodejs \ + npm \ postgresql-client \ tzdata \ vim \ - nodejs \ - npm \ && rm -rf /var/cache/apk/* RUN echo "NodeJS Version:" "$(node -v)" From a0bb7cc6fc38f211a0212c17293f42007820fc64 Mon Sep 17 00:00:00 2001 From: Shen Yang Date: Wed, 21 May 2025 10:11:15 -0500 Subject: [PATCH 4/4] move bundle required packages to bundle section of build --- Dockerfile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 56fe0d23b1..62d9e7ca45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,9 @@ FROM ruby:3.3.8-alpine AS builder RUN apk update && apk upgrade && apk add --update --no-cache \ build-base \ curl-dev \ + libffi-dev \ + yaml-dev \ + linux-headers \ postgresql-dev \ tzdata @@ -24,9 +27,6 @@ RUN apk update && apk upgrade && apk add --update --no-cache \ build-base \ curl \ imagemagick \ - libffi-dev \ - perl-yaml-libyaml \ - linux-headers \ nodejs \ npm \ postgresql-client \ @@ -34,14 +34,10 @@ RUN apk update && apk upgrade && apk add --update --no-cache \ vim \ && rm -rf /var/cache/apk/* -RUN echo "NodeJS Version:" "$(node -v)" -RUN echo "NPM Version:" "$(npm -v)" - WORKDIR $RAILS_ROOT COPY . . RUN npm install --global npm -RUN npm --version RUN npm install RUN npm run build && npm run build:css