diff --git a/.bash_history b/.bash_history deleted file mode 100644 index d555483..0000000 --- a/.bash_history +++ /dev/null @@ -1,29 +0,0 @@ -rubocop -rubocop -rubocop -rubocop -a -rubocop -a -exit -rails crendential:edit -rails credential:edit -rails credentials:edit -EDITOR="mate --wait" bin/rails credentials:edit -EDITOR="cat" bin/rails credentials:edit -rails.application.credentials.secret_key_base -docker ps -exit -bin/rails geoblacklight:index:seed -rspec -bin/rails geoblacklight:index:seed -exit -bin/rails geoblacklight:index:seed -exit -bin/rails geoblacklight:index:seed -docker-compose down -v -exit -bin/rails geoblacklight:index:seed -exit -bin/rails geoblacklight:index:seed -exit -rspec -exit diff --git a/.gitignore b/.gitignore index c2a85fe..e3a0745 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.rbc capybara-*.html +.bash* .rspec /db/*.sqlite3 /db/*.sqlite3-journal diff --git a/Gemfile b/Gemfile index ea1f0e9..ee2d8b4 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,7 @@ gem 'jquery-rails' gem 'omniauth-cas' gem 'pg', '~> 1.4.6' gem 'puma', '~> 5.0' +gem 'rack-timeout', '~> 0.6.3' gem 'rails', '~> 7.0.4', '>= 7.0.4.3' gem 'rsolr', '>= 1.0', '< 3' gem 'sassc-rails', '~> 2.1' diff --git a/Gemfile.lock b/Gemfile.lock index c14f71c..f583cca 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -308,6 +308,7 @@ GEM rack (2.2.8) rack-test (2.1.0) rack (>= 1.3) + rack-timeout (0.6.3) rails (7.0.8) actioncable (= 7.0.8) actionmailbox (= 7.0.8) @@ -502,6 +503,7 @@ DEPENDENCIES omniauth-cas pg (~> 1.4.6) puma (~> 5.0) + rack-timeout (~> 0.6.3) rails (~> 7.0.4, >= 7.0.4.3) rsolr (>= 1.0, < 3) rspec-rails diff --git a/config/environments/production.rb b/config/environments/production.rb index d38c71f..79b4984 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -52,7 +52,7 @@ # Include generic and useful information about system operation, but avoid logging too much # information to avoid inadvertent exposure of personally identifiable information (PII). - config.log_level = :info + config.log_level = :error # Prepend all log lines with the following tags. config.log_tags = [:request_id] diff --git a/config/puma.rb b/config/puma.rb index 0593712..a10957b 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -4,40 +4,34 @@ # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches the default thread size of Active Record. # -max_threads_count = ENV.fetch('RAILS_MAX_THREADS', 5) -min_threads_count = ENV.fetch('RAILS_MIN_THREADS') { max_threads_count } -threads min_threads_count, max_threads_count +threads_count = ENV.fetch('PUMA_THREADS', 5).to_i +threads threads_count, threads_count # Specifies the `worker_timeout` threshold that Puma will use to wait before # terminating a worker in development environments. -# worker_timeout 3600 if ENV.fetch('RAILS_ENV', 'development') == 'development' # Specifies the `port` that Puma will listen on to receive requests; default is 3000. -# port ENV.fetch('PORT', 3000) # Specifies the `environment` that Puma will run in. -# -environment ENV.fetch('RAILS_ENV') { 'development' } +environment ENV.fetch('RAILS_ENV', 'development') # Specifies the `pidfile` that Puma will use. -pidfile ENV.fetch('PIDFILE') { 'tmp/pids/server.pid' } +pidfile ENV.fetch('PIDFILE', 'tmp/pids/server.pid') # Specifies the number of `workers` to boot in clustered mode. # Workers are forked web server processes. If using threads and workers together # the concurrency of the application would be max `threads` * `workers`. # Workers do not work on JRuby or Windows (both of which do not support # processes). -# -# workers ENV.fetch("WEB_CONCURRENCY") { 2 } +workers ENV.fetch('PUMA_WORKERS', 2).to_i # Use the `preload_app!` method when specifying a `workers` number. # This directive tells Puma to first boot the application and load code # before forking the application. This takes advantage of Copy On Write # process behavior so workers use less memory. -# -# preload_app! +preload_app! # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart