Skip to content

Commit

Permalink
Upgrade Rails minor version to 7.0.8, amended Dockerfile for build
Browse files Browse the repository at this point in the history
 - Include alpine build-base pkg, for building newer gem versions
  • Loading branch information
robinkaranu authored and QbDesu committed Dec 26, 2023
1 parent 8cb930b commit 4eadb96
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 105 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RUN set -eux; \
musl-dev \
patch \
postgresql-dev \
build-base \
; \
\
gem install -v 2.3.9 bundler; \
Expand Down
174 changes: 88 additions & 86 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,47 @@ GEM
specs:
aasm (5.4.0)
concurrent-ruby (~> 1.0)
actioncable (7.0.4.2)
actionpack (= 7.0.4.2)
activesupport (= 7.0.4.2)
actioncable (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.4.2)
actionpack (= 7.0.4.2)
activejob (= 7.0.4.2)
activerecord (= 7.0.4.2)
activestorage (= 7.0.4.2)
activesupport (= 7.0.4.2)
actionmailbox (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.4.2)
actionpack (= 7.0.4.2)
actionview (= 7.0.4.2)
activejob (= 7.0.4.2)
activesupport (= 7.0.4.2)
actionmailer (7.0.8)
actionpack (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activesupport (= 7.0.8)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.4.2)
actionview (= 7.0.4.2)
activesupport (= 7.0.4.2)
rack (~> 2.0, >= 2.2.0)
actionpack (7.0.8)
actionview (= 7.0.8)
activesupport (= 7.0.8)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.4.2)
actionpack (= 7.0.4.2)
activerecord (= 7.0.4.2)
activestorage (= 7.0.4.2)
activesupport (= 7.0.4.2)
actiontext (7.0.8)
actionpack (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.4.2)
activesupport (= 7.0.4.2)
actionview (7.0.8)
activesupport (= 7.0.8)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
Expand All @@ -63,22 +63,22 @@ GEM
kaminari (~> 1.0, >= 1.2.1)
railties (>= 6.1, < 7.1)
ransack (>= 2.1.1, < 4)
activejob (7.0.4.2)
activesupport (= 7.0.4.2)
activejob (7.0.8)
activesupport (= 7.0.8)
globalid (>= 0.3.6)
activemodel (7.0.4.2)
activesupport (= 7.0.4.2)
activerecord (7.0.4.2)
activemodel (= 7.0.4.2)
activesupport (= 7.0.4.2)
activestorage (7.0.4.2)
actionpack (= 7.0.4.2)
activejob (= 7.0.4.2)
activerecord (= 7.0.4.2)
activesupport (= 7.0.4.2)
activemodel (7.0.8)
activesupport (= 7.0.8)
activerecord (7.0.8)
activemodel (= 7.0.8)
activesupport (= 7.0.8)
activestorage (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activesupport (= 7.0.8)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.4.2)
activesupport (7.0.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -129,10 +129,10 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.2.0)
concurrent-ruby (1.2.2)
connection_pool (2.3.0)
crass (1.0.6)
date (3.3.3)
date (3.3.4)
devise (4.8.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
Expand Down Expand Up @@ -197,8 +197,8 @@ GEM
formtastic_i18n (0.7.0)
get_process_mem (0.2.7)
ffi (~> 1.0)
globalid (1.1.0)
activesupport (>= 5.0)
globalid (1.2.1)
activesupport (>= 6.1)
goldiloader (4.2.0)
activerecord (>= 5.2, < 7.2)
activesupport (>= 5.2, < 7.2)
Expand All @@ -219,7 +219,7 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
hashie (5.0.0)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
inherited_resources (1.13.1)
actionpack (>= 5.2, < 7.1)
Expand Down Expand Up @@ -253,40 +253,40 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.19.1)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.8.0.1)
nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.8.1)
minitest (5.17.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.20.0)
multi_json (1.15.0)
multipart-post (2.3.0)
net-imap (0.3.4)
net-imap (0.4.8)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.1)
net-protocol (0.2.2)
timeout
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-smtp (0.3.3)
net-smtp (0.4.0)
net-protocol
net-ssh (7.0.1)
nio4r (2.5.8)
nokogiri (1.14.1)
mini_portile2 (~> 2.8.0)
nio4r (2.7.0)
nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.14.1-x86_64-darwin)
nokogiri (1.15.5-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.14.1-x86_64-linux)
nokogiri (1.15.5-x86_64-linux)
racc (~> 1.4)
orm_adapter (0.5.0)
pg (1.4.5)
Expand All @@ -305,43 +305,45 @@ GEM
puma_worker_killer (0.3.1)
get_process_mem (~> 0.2)
puma (>= 2.7)
racc (1.6.2)
rack (2.2.6.2)
racc (1.7.3)
rack (2.2.8)
rack-cors (1.1.1)
rack (>= 2.0.0)
rack-test (2.0.2)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.4.2)
actioncable (= 7.0.4.2)
actionmailbox (= 7.0.4.2)
actionmailer (= 7.0.4.2)
actionpack (= 7.0.4.2)
actiontext (= 7.0.4.2)
actionview (= 7.0.4.2)
activejob (= 7.0.4.2)
activemodel (= 7.0.4.2)
activerecord (= 7.0.4.2)
activestorage (= 7.0.4.2)
activesupport (= 7.0.4.2)
rails (7.0.8)
actioncable (= 7.0.8)
actionmailbox (= 7.0.8)
actionmailer (= 7.0.8)
actionpack (= 7.0.8)
actiontext (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activemodel (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
bundler (>= 1.15.0)
railties (= 7.0.4.2)
railties (= 7.0.8)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
railties (7.0.4.2)
actionpack (= 7.0.4.2)
activesupport (= 7.0.4.2)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
rake (13.1.0)
ransack (3.2.1)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
Expand Down Expand Up @@ -415,9 +417,9 @@ GEM
net-ssh (>= 2.8.0)
stringio (3.0.4)
temple (0.10.0)
thor (1.2.1)
thor (1.3.0)
tilt (2.0.11)
timeout (0.3.1)
timeout (0.4.1)
tinymce-rails (6.3.1)
railties (>= 3.1.1)
turbolinks (5.2.1)
Expand All @@ -432,11 +434,11 @@ GEM
activesupport
warden (1.2.9)
rack (>= 2.0.9)
websocket-driver (0.7.5)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
yajl-ruby (1.4.3)
zeitwerk (2.6.6)
zeitwerk (2.6.12)

PLATFORMS
ruby
Expand Down Expand Up @@ -501,4 +503,4 @@ DEPENDENCIES
yajl-ruby

BUNDLED WITH
2.3.8
2.3.9
2 changes: 1 addition & 1 deletion bin/rails
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../config/application', __dir__)
APP_PATH = File.expand_path("../config/application", __dir__)
require_relative "../config/boot"
require "rails/commands"
29 changes: 11 additions & 18 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require "fileutils"

# path to your application root.
APP_ROOT = File.expand_path('..', __dir__)
APP_ROOT = File.expand_path("..", __dir__)

def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
Expand All @@ -13,28 +13,21 @@ FileUtils.chdir APP_ROOT do
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
# Add necessary setup steps to this file.

puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install --jobs=3')
puts "== Installing dependencies =="
system! "gem install bundler --conservative"
system("bundle check") || system!("bundle install")

puts "\n== Copying sample files =="
unless File.exist?('config/database.yml')
FileUtils.cp 'config/database.yml.template', 'config/database.yml'
end
unless File.exist?('config/settings.yml')
FileUtils.cp 'config/settings.yml.template', 'config/settings.yml'
end
FileUtils.cp 'env.example', '.env.production' unless File.exist?('.env.production')
# puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml")
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
# end

puts "\n== Preparing database =="
system! 'bin/rails db:setup'

puts "\n== Preparing elastic search =="
system 'bin/rails runner "Event.__elasticsearch__.create_index! force: true"'
system! "bin/rails db:prepare"

puts "\n== Removing old logs and tempfiles =="
system! 'bin/rails log:clear tmp:clear'
system! "bin/rails log:clear tmp:clear"

puts "\n== Restarting application server =="
system! 'bin/rails restart'
system! "bin/rails restart"
end

0 comments on commit 4eadb96

Please sign in to comment.