Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TracksApp/tracks
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b7778709e7aff824d93f085a57d93b6bb3b34c71
Choose a base ref
..
head repository: TracksApp/tracks
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a71282404696b51a981db1b75939366d3da6a9a1
Choose a head ref
2 changes: 1 addition & 1 deletion Dockerfile-2.6 → Dockerfile-3.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.6
FROM ruby:3.1

# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
30 changes: 30 additions & 0 deletions Dockerfile-3.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ruby:3.2

# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1

WORKDIR /app

RUN touch /etc/app-env

RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install -y yarn

COPY Gemfile* /app/
RUN gem install bundler
RUN bundle install --jobs 4

RUN mkdir /app/log

COPY . /app/
COPY config/database.docker.yml /app/config/database.yml
COPY config/site.docker.yml /app/config/site.yml

RUN RAILS_ENV=production bundle exec rake assets:precompile

ENTRYPOINT ["/app/docker-entrypoint.sh"]

EXPOSE 3000

CMD ["rails", "server", "-b", "0.0.0.0"]
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ gem 'rails', '~> 6.0.0'
gem 'sassc-rails', '~> 2.1.2'

gem 'bootstrap-sass', '3.4.1'
gem 'font-awesome-sass', '~> 6.4.0'
gem 'font-awesome-sass', '~> 6.4.2'

gem 'uglifier', '>=1.3.0'

@@ -24,7 +24,7 @@ gem "kt-paperclip", "~> 7.2"
gem 'puma', '~> 6.3'
gem 'rails_autolink'
gem 'RedCloth'
gem 'sanitize', '~> 6.0'
gem 'sanitize', '~> 6.1'
gem 'tracks-chartjs-ror'
gem 'will_paginate'

@@ -34,7 +34,7 @@ gem 'therubyracer', group: :therubyracer
# Use --without <group> argument to skip unnecessary drivers
gem 'sqlite3', group: :sqlite
gem 'mysql2', '~> 0.5.5', group: :mysql
gem 'pg', '~> 1.5.3', group: :postgresql
gem 'pg', '~> 1.5.4', group: :postgresql

group :development do
gem 'spring', '~> 4'
@@ -46,13 +46,13 @@ group :development do
gem 'rack-mini-profiler'
gem 'solargraph'

gem 'i18n-tasks', '~> 1.0.12'
gem 'i18n-tasks', '~> 1.0.13'
end

group :development, :test do
gem 'byebug'
gem 'listen'
gem 'rubocop', '~> 1.54', require: false
gem 'rubocop', '~> 1.57', require: false
end

group :test do
@@ -64,7 +64,7 @@ group :test do
gem 'minitest-stub-const'
gem 'mocha', :require => false
gem 'rails-controller-testing'
gem 'rails-dom-testing', '~> 2.1.1'
gem 'rails-dom-testing', '~> 2.2.0'
gem 'rspec-expectations'
gem 'simplecov'
end
66 changes: 34 additions & 32 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -72,9 +72,10 @@ GEM
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
backport (1.2.0)
base64 (0.1.1)
bcrypt (3.1.19)
benchmark (0.2.1)
better_html (2.0.1)
better_html (2.0.2)
actionview (>= 6.0)
activesupport (>= 6.0)
ast (~> 2.0)
@@ -85,7 +86,7 @@ GEM
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
builder (3.2.4)
bullet (7.0.7)
bullet (7.1.2)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.1.3)
@@ -113,23 +114,23 @@ GEM
factory_bot_rails (6.2.0)
factory_bot (~> 6.2.0)
railties (>= 5.0.0)
ffi (1.15.5)
font-awesome-sass (6.4.0)
ffi (1.16.3)
font-awesome-sass (6.4.2)
sassc (~> 2.0)
globalid (1.1.0)
activesupport (>= 5.0)
highline (2.0.3)
highline (2.1.0)
htmlentities (4.3.4)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
i18n-tasks (1.0.12)
i18n-tasks (1.0.13)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
better_html (>= 1.0, < 3.0)
erubi
highline (>= 2.0.0)
i18n
parser (>= 2.2.3.0)
parser (>= 3.2.2.1)
rails-i18n
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
@@ -156,7 +157,7 @@ GEM
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.21.3)
loofah (2.21.4)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
@@ -170,10 +171,10 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mini_mime (1.1.2)
mini_portile2 (2.8.2)
minitest (5.18.1)
mini_portile2 (2.8.4)
minitest (5.20.0)
minitest-stub-const (0.6)
mocha (2.0.4)
mocha (2.1.0)
ruby2_keywords (>= 0.0.5)
mysql2 (0.5.5)
net-imap (0.3.6)
@@ -186,19 +187,19 @@ GEM
net-smtp (0.3.3)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.3)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
parallel (1.23.0)
parser (3.2.2.3)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
pg (1.5.3)
pg (1.5.4)
puma (6.3.1)
nio4r (~> 2.0)
racc (1.7.1)
rack (2.2.7)
rack-mini-profiler (3.1.0)
rack (2.2.8)
rack-mini-profiler (3.1.1)
rack (>= 1.2.0)
rack-test (2.1.0)
rack (>= 1.3)
@@ -221,14 +222,14 @@ GEM
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.1.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
rails-i18n (7.0.5)
rails-i18n (7.0.8)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
rails_autolink (1.1.8)
@@ -248,31 +249,32 @@ GEM
ffi (~> 1.0)
rbs (2.8.4)
ref (2.0.0)
regexp_parser (2.8.1)
regexp_parser (2.8.2)
reverse_markdown (2.1.1)
nokogiri
rexml (3.2.5)
rexml (3.2.6)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.54.2)
rubocop (1.57.0)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
safe_yaml (1.0.5)
sanitize (6.0.2)
sanitize (6.1.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
sassc (2.4.0)
@@ -336,14 +338,14 @@ GEM
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
uniform_notifier (1.16.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
will_paginate (4.0.0)
yard (0.9.34)
zeitwerk (2.6.8)
zeitwerk (2.6.12)

PLATFORMS
ruby
@@ -362,26 +364,26 @@ DEPENDENCIES
coffee-rails (~> 5.0.0)
database_cleaner (~> 1)
factory_bot_rails
font-awesome-sass (~> 6.4.0)
font-awesome-sass (~> 6.4.2)
htmlentities
i18n-tasks (~> 1.0.12)
i18n-tasks (~> 1.0.13)
jquery-rails (~> 4.6)
jquery-ui-rails (~> 6.0.1)
kt-paperclip (~> 7.2)
listen
minitest-stub-const
mocha
mysql2 (~> 0.5.5)
pg (~> 1.5.3)
pg (~> 1.5.4)
puma (~> 6.3)
rack-mini-profiler
rails (~> 6.0.0)
rails-controller-testing
rails-dom-testing (~> 2.1.1)
rails-dom-testing (~> 2.2.0)
rails_autolink
rspec-expectations
rubocop (~> 1.54)
sanitize (~> 6.0)
rubocop (~> 1.57)
sanitize (~> 6.1)
sassc-rails (~> 2.1.2)
simplecov
solargraph
29 changes: 29 additions & 0 deletions test-envs/docker-compose-3.1-mysql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '3'
services:
db:
image: mysql:5.7
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_DATABASE: ${TRACKS_DB:-tracks}
volumes:
- db-data:/var/lib/mysql
web:
build:
context: ..
dockerfile: Dockerfile-3.1
environment:
# These are set in script/ci-build, so we need to pass-thru them.
RAILS_ENV: $RAILS_ENV
DATABASE_NAME: $DATABASE_NAME
DATABASE_USERNAME: root
DATABASE_PASSWORD_EMPTY: 1
volumes:
- ${VOLUME:-..}:/app:Z
- ${VOLUME:-..}/config/database.docker.yml:/app/config/database.yml:Z
- ${VOLUME:-..}/config/site.docker.yml:/app/config/site.yml:Z
ports:
- 3000:3000
depends_on:
- db
volumes:
db-data:
32 changes: 32 additions & 0 deletions test-envs/docker-compose-3.1-postgres.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '3'
services:
db:
image: postgres:13
environment:
POSTGRES_DB: ${DATABASE_NAME:-tracks}
POSTGRES_PASSWORD: password
volumes:
- db-data:/var/lib/postgresql/data
web:
build:
context: ..
dockerfile: Dockerfile-3.1
environment:
# These are set in script/ci-build, so we need to pass-thru them.
RAILS_ENV: $RAILS_ENV
DATABASE_NAME: $DATABASE_NAME
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: password
DATABASE_TYPE: postgresql
DATABASE_ENCODING: unicode
DATABASE_PORT: 5432
volumes:
- ${VOLUME:-..}:/app:Z
- ${VOLUME:-..}/config/database.docker.yml:/app/config/database.yml:Z
- ${VOLUME:-..}/config/site.docker.yml:/app/config/site.yml:Z
ports:
- 3000:3000
depends_on:
- db
volumes:
db-data:
17 changes: 17 additions & 0 deletions test-envs/docker-compose-3.1-sqlite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3'
services:
web:
build:
context: ..
dockerfile: Dockerfile-3.1
environment:
# These are set in script/ci-build, so we need to pass-thru them.
RAILS_ENV: $RAILS_ENV
DATABASE_NAME: "/app/db.sqlite"
DATABASE_TYPE: sqlite3
volumes:
- ${VOLUME:-..}:/app:Z
- ${VOLUME:-..}/config/database.docker.yml:/app/config/database.yml:Z
- ${VOLUME:-..}/config/site.docker.yml:/app/config/site.yml:Z
ports:
- 3000:3000
Loading