diff --git a/Dockerfile b/Dockerfile index d483e82..94b32bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN apk -U add --no-cache \ RUN gem install bundler --version "$BUNDLE_VERSION" \ && rm -rf $GEM_HOME/cache/* -COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh +COPY ./docker/entrypoint.sh /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh COPY Gemfile Gemfile.lock ./ diff --git a/Dockerfile.dev b/Dockerfile.dev index f659263..9895c44 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -8,8 +8,8 @@ ENV RAILS_LOG_TO_STDOUT true ENV RAILS_PORT 3000 # copy entrypoint scripts and grant execution permissions -COPY ./dev-docker-entrypoint.sh /usr/local/bin/dev-entrypoint.sh -COPY ./test-docker-entrypoint.sh /usr/local/bin/test-entrypoint.sh +COPY ./docker/dev-docker-entrypoint.sh /usr/local/bin/dev-entrypoint.sh +COPY ./docker/test-docker-entrypoint.sh /usr/local/bin/test-entrypoint.sh RUN chmod +x /usr/local/bin/dev-entrypoint.sh && chmod +x /usr/local/bin/test-entrypoint.sh # install dependencies for application diff --git a/Gemfile b/Gemfile index 9627250..0b80f0a 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -gem 'rails', '~> 6.1', '>= 6.1.7.10' +gem 'rails', '~> 7.2', '>= 7.2.2.1' gem 'jbuilder' gem 'pg' diff --git a/Gemfile.lock b/Gemfile.lock index 01cd409..e553c65 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,70 +1,84 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.10) - actionpack (= 6.1.7.10) - activesupport (= 6.1.7.10) + actioncable (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.10) - actionpack (= 6.1.7.10) - activejob (= 6.1.7.10) - activerecord (= 6.1.7.10) - activestorage (= 6.1.7.10) - activesupport (= 6.1.7.10) - mail (>= 2.7.1) - actionmailer (6.1.7.10) - actionpack (= 6.1.7.10) - actionview (= 6.1.7.10) - activejob (= 6.1.7.10) - activesupport (= 6.1.7.10) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (6.1.7.10) - actionview (= 6.1.7.10) - activesupport (= 6.1.7.10) - rack (~> 2.0, >= 2.0.9) + zeitwerk (~> 2.6) + 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.2.2.1) + actionview (= 7.2.2.1) + activesupport (= 7.2.2.1) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4, < 3.2) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.7.10) - actionpack (= 6.1.7.10) - activerecord (= 6.1.7.10) - activestorage (= 6.1.7.10) - activesupport (= 6.1.7.10) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + 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 (6.1.7.10) - activesupport (= 6.1.7.10) + actionview (7.2.2.1) + activesupport (= 7.2.2.1) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.7.10) - activesupport (= 6.1.7.10) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.2.2.1) + activesupport (= 7.2.2.1) globalid (>= 0.3.6) - activemodel (6.1.7.10) - activesupport (= 6.1.7.10) - activerecord (6.1.7.10) - activemodel (= 6.1.7.10) - activesupport (= 6.1.7.10) - activestorage (6.1.7.10) - actionpack (= 6.1.7.10) - activejob (= 6.1.7.10) - activerecord (= 6.1.7.10) - activesupport (= 6.1.7.10) + 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.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) - mini_mime (>= 1.1.0) - activesupport (6.1.7.10) - concurrent-ruby (~> 1.0, >= 1.0.2) + activesupport (7.2.2.1) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - tzinfo (~> 2.0) - zeitwerk (~> 2.3) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) argon2-kdf (0.2.0) ast (2.4.2) + base64 (0.2.0) bcrypt (3.1.20) + benchmark (0.4.0) bigdecimal (3.1.8) bindex (0.8.1) blind_index (2.5.0) @@ -87,7 +101,7 @@ GEM cronex (0.15.0) tzinfo unicode (>= 0.4.4.5) - date (3.3.4) + date (3.4.1) devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -96,6 +110,7 @@ GEM warden (~> 1.2.3) diff-lcs (1.5.1) docile (1.4.1) + drb (2.2.1) erubi (1.13.0) et-orbi (1.2.11) tzinfo @@ -124,6 +139,10 @@ GEM rake (>= 13) i18n (1.14.6) concurrent-ruby (~> 1.0) + io-console (0.8.0) + irb (1.14.2) + rdoc (>= 4.0.0) + reline (>= 0.4.2) jbuilder (2.13.0) actionview (>= 5.0.0) activesupport (>= 5.0.0) @@ -148,12 +167,11 @@ GEM net-pop net-smtp marcel (1.0.4) - method_source (1.1.0) mini_mime (1.1.5) mini_portile2 (2.8.8) minitest (5.25.4) msgpack (1.7.5) - net-imap (0.5.0) + net-imap (0.5.1) date net-protocol net-pop (0.1.2) @@ -180,12 +198,15 @@ GEM google-protobuf (>= 3.25.3) pghero (3.6.1) activerecord (>= 6.1) + psych (5.2.1) + date + stringio public_suffix (6.0.1) puma (6.5.0) nio4r (~> 2.0) raabro (1.4.0) racc (1.8.1) - rack (2.2.10) + rack (3.1.8) rack-canonical-host (1.3.0) addressable (> 0, < 3) rack (>= 1.6, < 4) @@ -193,23 +214,26 @@ GEM rack (>= 1.2.0) rack-proxy (0.7.7) rack + rack-session (2.0.0) + rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rails (6.1.7.10) - actioncable (= 6.1.7.10) - actionmailbox (= 6.1.7.10) - actionmailer (= 6.1.7.10) - actionpack (= 6.1.7.10) - actiontext (= 6.1.7.10) - actionview (= 6.1.7.10) - activejob (= 6.1.7.10) - activemodel (= 6.1.7.10) - activerecord (= 6.1.7.10) - activestorage (= 6.1.7.10) - activesupport (= 6.1.7.10) + rackup (2.2.1) + rack (>= 3) + 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 (= 6.1.7.10) - sprockets-rails (>= 2.0.0) + railties (= 7.2.2.1) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -217,17 +241,21 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) 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 (6.1.7.10) - actionpack (= 6.1.7.10) - activesupport (= 6.1.7.10) - method_source + 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) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) + rdoc (6.9.0) + psych (>= 4.0.0) redis (5.3.0) redis-client (>= 0.22.0) redis-client (0.23.0) @@ -235,6 +263,8 @@ GEM redis-namespace (1.11.0) redis (>= 4) regexp_parser (2.9.3) + reline (0.5.12) + io-console (~> 0.5) responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) @@ -289,6 +319,7 @@ GEM sprockets (> 3.0) sprockets-rails tilt + securerandom (0.4.0) semantic_range (3.0.0) sidekiq (7.3.6) connection_pool (>= 2.3.0) @@ -314,10 +345,11 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) + stringio (3.1.2) thor (1.3.2) tilt (2.4.0) timecop (0.9.10) - timeout (0.4.1) + timeout (0.4.2) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) @@ -327,6 +359,7 @@ GEM unicode-display_width (3.1.2) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) + useragent (0.16.11) warden (1.2.9) rack (>= 2.0.9) web-console (4.2.1) @@ -368,7 +401,7 @@ DEPENDENCIES puma rack-canonical-host rack-mini-profiler - rails (~> 6.1, >= 6.1.7.10) + rails (~> 7.2, >= 7.2.2.1) redis redis-namespace rexml diff --git a/docker-compose.yml b/docker-compose.yml index ab10278..27bdbc7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -48,7 +48,7 @@ services: stdin_open: true tty: true env_file: .env.development - entrypoint: dev-entrypoint.sh + entrypoint: docker/dev-entrypoint.sh command: ["rails", "server", "-p", "3000", "-b", "0.0.0.0"] depends_on: - db @@ -71,7 +71,7 @@ services: # stdin_open: true # tty: true # env_file: .env.development - # entrypoint: dev-entrypoint.sh + # entrypoint: docker/dev-entrypoint.sh # command: ["./bin/webpack-dev-server"] # restart: "always" @@ -89,7 +89,7 @@ services: stdin_open: true tty: true env_file: .env.development - entrypoint: dev-entrypoint.sh + entrypoint: docker/dev-entrypoint.sh command: ["sidekiq"] environment: RAILS_ENV: development @@ -114,7 +114,7 @@ services: stdin_open: true tty: true env_file: .env.test - entrypoint: test-entrypoint.sh + entrypoint: docker/test-entrypoint.sh command: ["rails", "-v"] depends_on: - db diff --git a/dev-docker-entrypoint.sh b/docker/dev-docker-entrypoint.sh similarity index 79% rename from dev-docker-entrypoint.sh rename to docker/dev-docker-entrypoint.sh index fb8bdb4..112983f 100644 --- a/dev-docker-entrypoint.sh +++ b/docker/dev-docker-entrypoint.sh @@ -10,9 +10,9 @@ bundle check || bundle install --jobs 20 --retry 5 yarn install # Remove pre-existing puma/passenger server.pid -rm -f $APP_PATH/tmp/pids/server.pid || true +rm -f "${APP_PATH}"/tmp/pids/server.pid || true bundle exec rails db:prepare # Then run any passed command -bundle exec ${@} +bundle exec "${@}" diff --git a/entrypoint.sh b/docker/entrypoint.sh similarity index 81% rename from entrypoint.sh rename to docker/entrypoint.sh index ec60b39..ec259af 100644 --- a/entrypoint.sh +++ b/docker/entrypoint.sh @@ -5,4 +5,4 @@ set -e echo "Environment: $RAILS_ENV" # Then run any passed command -bundle exec ${@} +bundle exec "${@}" diff --git a/test-docker-entrypoint.sh b/docker/test-docker-entrypoint.sh similarity index 79% rename from test-docker-entrypoint.sh rename to docker/test-docker-entrypoint.sh index d17b894..660d045 100644 --- a/test-docker-entrypoint.sh +++ b/docker/test-docker-entrypoint.sh @@ -8,9 +8,9 @@ echo "Environment: $RAILS_ENV" bundle check || bundle install --jobs 20 --retry 5 # Remove pre-existing puma/passenger server.pid -rm -f $APP_PATH/tmp/pids/server.pid || true +rm -f "$APP_PATH"/tmp/pids/server.pid || true bundle exec rails db:prepare # Then run any passed command -bundle exec ${@} +bundle exec "${@}"