Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging R7 to Prod #824

Merged
merged 33 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e2c2473
WIP
balen May 1, 2023
b3e308f
WIP
balen May 12, 2023
4d9dcb4
Merge branch 'staging' into rails7-upgrade
balen May 24, 2023
9ce6cc4
Merge branch 'staging' into rails7-upgrade
balen Jun 13, 2023
430f10e
WIP
balen Jun 21, 2023
01c4759
WIP - mostly working
balen Jul 31, 2023
3ed21aa
Merge branch 'production' into rails7-upgrade
balen Jul 31, 2023
57478c4
merge in fixes
balen Jul 31, 2023
db3c060
WIP
balen Jul 31, 2023
698f429
Tweak startup scripts
balen Aug 1, 2023
11a7f8a
Merge pull request #749 from open-data-rescue/rails7-upgrade
balen Aug 1, 2023
3b75c07
fix for github action
balen Aug 1, 2023
7053e88
Merge pull request #750 from open-data-rescue/rails7-upgrade
balen Aug 1, 2023
f0165ed
fixes for action
balen Aug 1, 2023
3513d16
Merge pull request #751 from open-data-rescue/rails7-upgrade
balen Aug 1, 2023
0867c0a
fix case typo
balen Aug 1, 2023
c7979b2
fix case
balen Aug 1, 2023
47a4db8
Merge pull request #752 from open-data-rescue/rails7-upgrade
balen Aug 1, 2023
4babf9b
fixed my profile page
balen Aug 2, 2023
8ee8be1
Merge pull request #754 from open-data-rescue/rails7-upgrade
balen Aug 2, 2023
1c6edf8
Fix transcription error for new lines
balen Sep 7, 2023
b8ed5a4
Merge pull request #774 from open-data-rescue/rails7-upgrade
balen Sep 7, 2023
f88a5ef
Update gems
balen Sep 7, 2023
92994ea
Merge pull request #775 from open-data-rescue/rails7-upgrade
balen Sep 7, 2023
e71968f
Fixes for vite module load and select2
balen Sep 13, 2023
8f66dd6
tweak my conf
balen Nov 27, 2023
1a43796
Merge branch 'production' into staging
balen Apr 30, 2024
59f5130
Fixes selection on transcription window
balen Apr 30, 2024
7ad4b2f
Merge pull request #820 from open-data-rescue/fix-select2
balen Apr 30, 2024
a44136e
Merge branch 'staging' into rails7-upgrade
balen Apr 30, 2024
5b0acac
Merge branch 'production' into rails7-upgrade
balen Aug 28, 2024
2418d80
fix db host for specs
balen Aug 30, 2024
e2cc4a4
update brakeman
balen Aug 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
- name: Run specs
run: |
docker run -d --name="test-database" --hostname "mysql" -e "MYSQL_PASSWORD=test" -e "MYSQL_USER=test" -e "MYSQL_ROOT_PASSWORD=test" -p 127.0.0.1:3306:3306/tcp mysql:5.7
docker run --network "container:test-database" -e RAILS_ENV=test -e DEVISE_SECRET=${{ env.DEVISE_SECRET }} -e SECRET_KEY_BASE=${{ env.SECRET_KEY_BASE }} -e "MYSQL_PASSWORD=test" -e "RAILS_MYSQL_USER=root" -e "BASE_URL=localhost:3000" ${{ env.TEST_TAG }} /bin/sh -c "bundle exec rake db:create db:setup; bundle exec rake db:seed; bundle exec rspec"
docker run --network "container:test-database" -e DB_HOST=mysql -e RAILS_ENV=test -e DEVISE_SECRET=${{ env.DEVISE_SECRET }} -e SECRET_KEY_BASE=${{ env.SECRET_KEY_BASE }} -e "MYSQL_PASSWORD=test" -e "RAILS_MYSQL_USER=root" -e "BASE_URL=localhost:3000" ${{ env.TEST_TAG }} /bin/sh -c "bin/rails db:create; bin/rails db:setup; bin/rails db:seed; bundle exec rspec"

#
- name: Run security tests
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,11 @@ yarn-error.log*
/node_modules
yarn-debug.log*
.yarn-integrity

# Vite Ruby
/public/vite*
node_modules
# Vite uses dotenv and suggests to ignore local-only env files. See
# https://vitejs.dev/guide/env-and-mode.html#env-files
*.local

2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.7.3
ruby-3.1.2
6 changes: 2 additions & 4 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Use ruby image to build our own image
# TODO: change based when we change version of ruby
FROM --platform=linux/x86_64 ruby:2.7.3-alpine as base
FROM --platform=linux/x86_64 ruby:3.1.2-alpine as base

# Ensure that we work in UTF 8
ENV LANG C.UTF-8 # ensure that the encoding is UTF8
Expand Down Expand Up @@ -34,9 +34,7 @@ RUN apk add \
&& rm -rf /var/cache/apk/*

# Install bundler for this Docker image
# RUN gem install bundler:2.2.4
# TODO: ensure that version of bundler matches what we want
RUN gem install bundler:1.17.3
RUN gem install bundler:2.3.26

# pre-install bundle for speed later
ADD ./Gemfile /opt/draw/Gemfile
Expand Down
9 changes: 4 additions & 5 deletions Dockerfile-prod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Use ruby image to build our own image
# TODO: change based when we change version of ruby
FROM --platform=linux/x86_64 ruby:2.7.3-alpine as base
FROM --platform=linux/x86_64 ruby:3.1.2-alpine as base

# Ensure that we work in UTF 8
ENV LANG C.UTF-8 # ensure that the encoding is UTF8
Expand Down Expand Up @@ -33,20 +33,19 @@ RUN apk add \
&& rm -rf /var/cache/apk/*

# Install bundler for this Docker image
# TODO: ensure that version of bundler matches what we want
RUN gem install bundler:1.17.3
RUN gem install bundler:2.3.26

# WORKDIR /setup
ADD . /opt/draw
WORKDIR /opt/draw

# Just not use dev here
# TODO: we need to check this
RUN bin/bundle install --without development
RUN bin/yarn install --frozen-lockfile
RUN bin/vite install

# The pre-compile will be done as part of the deploy of the image
# The precompile will also deal with the webpacker assets
# RUN bin/rake assets:precompile --trace

# We expose the port
EXPOSE 3000
Expand Down
46 changes: 26 additions & 20 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
source 'https://rubygems.org'
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.7.3'
ruby "3.1.2"

gem 'rails', '~> 6.1'
gem "rails", "~> 7.0.4"

gem 'mysql2'

gem 'mime-types', require: 'mime/types/full'

gem 'paper_trail'
gem "ranked-model"

gem 'uglifier'

#bootstrap stuff
gem 'sass-rails'
# gem 'sass-rails'

gem 'log4r'

Expand All @@ -30,7 +29,7 @@ gem 'simple_form'
gem 'will_paginate'

#for attachments
gem 'paperclip'
gem 'kt-paperclip'

gem 'with_advisory_lock'

Expand All @@ -44,17 +43,17 @@ gem 'routing-filter'

gem 'http_accept_language'

gem 'rails-i18n'
gem 'rails-i18n', '~> 7.0.0'
gem 'i18n-active_record', :require => 'i18n/active_record'
# gem 'i18n-tasks'

gem 'rails-observers'

gem 'friendly_id', '~> 5.4.2'
gem 'mobility', '~> 1.0.3'
gem 'friendly_id-mobility', '~> 1.0.3'
# gem 'mobility', '~> 1.0.3'
# gem 'friendly_id-mobility', '~> 1.0.3'

gem 'globalize', '~> 6.0' # TODO: change when Rails upgrades
gem 'globalize'
gem 'globalize-accessors'

gem "sidekiq"
Expand All @@ -64,32 +63,33 @@ gem "sidekiq-scheduler"
# gem 'bcrypt-ruby', '~> 3.0.0'
gem 'newrelic_rpm'

gem 'puma', '>= 5.0'
# gem 'puma', '~> 5.0'
gem 'puma', '~> 6.3.1'

gem "recaptcha", require: "recaptcha/rails"

gem 'bootsnap', '>= 1.4.4', require: false
# gem 'bootsnap', require: false

# gem 'websocket-extensions', '~> 0.1.5'

# gem 'webpacker', '~> 3.5'
gem 'webpacker', '~> 5.0'
gem 'websocket-extensions', '~> 0.1.5'
gem "cssbundling-rails", "~> 1.1"

group :development do
gem "better_errors"
gem "binding_of_caller"

gem "byebug"
gem "rails-erd"
# gem "rails-erd"
gem 'rb-readline'
gem 'rubocop'
gem 'rack-mini-profiler'
gem 'rbtrace'

# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'web-console'
# 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.1.0'
# gem 'spring'
# gem 'spring-watcher-listen', '~> 2.1.0'
end

group :development, :test do
Expand All @@ -116,3 +116,9 @@ end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem "vite_rails", "~> 3.0"
gem 'vite_plugin_legacy'

gem "haml-rails"
# gem "sassc-rails"
Loading
Loading