From 7bd70c7d010e3ec352824e30d595494bbdc69033 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Fri, 16 May 2025 00:42:24 +0900 Subject: [PATCH] =?UTF-8?q?#6=20=E5=AE=8C=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.gitignore | 6 ++ backend/Gemfile | 6 +- backend/Gemfile.lock | 120 +++++++++------------- backend/config/cable.yml | 14 +-- backend/config/environments/production.rb | 6 +- backend/config/puma.rb | 4 +- 6 files changed, 71 insertions(+), 85 deletions(-) diff --git a/backend/.gitignore b/backend/.gitignore index 063233c..8bcd372 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -30,3 +30,9 @@ # Ignore master key for decrypting credentials and more. /config/master.key + +/config/credentials.yml.enc +/config/credentials/* +/config/database.yml + +/config/credentials/production.key diff --git a/backend/Gemfile b/backend/Gemfile index 0a8bfd3..a469a24 100644 --- a/backend/Gemfile +++ b/backend/Gemfile @@ -16,9 +16,9 @@ gem "puma", ">= 5.0" gem "tzinfo-data", platforms: %i[ windows jruby ] # Use the database-backed adapters for Rails.cache, Active Job, and Action Cable -gem "solid_cache" -gem "solid_queue" -gem "solid_cable" +# gem "solid_cache" +# gem "solid_queue" +# gem "solid_cable" # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", require: false diff --git a/backend/Gemfile.lock b/backend/Gemfile.lock index 7955da9..06366a7 100644 --- a/backend/Gemfile.lock +++ b/backend/Gemfile.lock @@ -72,61 +72,56 @@ GEM securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) - ast (2.4.2) + ast (2.4.3) base64 (0.2.0) bcrypt_pbkdf (1.1.1) bcrypt_pbkdf (1.1.1-arm64-darwin) bcrypt_pbkdf (1.1.1-x86_64-darwin) benchmark (0.4.0) bigdecimal (3.1.9) - bootsnap (1.18.4) + bootsnap (1.18.6) msgpack (~> 1.2) - brakeman (7.0.0) + brakeman (7.0.2) racc builder (3.3.0) concurrent-ruby (1.3.5) - connection_pool (2.5.0) + connection_pool (2.5.3) crass (1.0.6) date (3.4.1) debug (1.10.0) irb (~> 1.10) reline (>= 0.3.8) - dotenv (3.1.7) + dotenv (3.1.8) drb (2.2.1) - ed25519 (1.3.0) + ed25519 (1.4.0) erubi (1.13.1) - et-orbi (1.2.11) - tzinfo - fugit (1.11.1) - et-orbi (~> 1, >= 1.2.11) - raabro (~> 1.4) globalid (1.2.1) activesupport (>= 6.1) i18n (1.14.7) concurrent-ruby (~> 1.0) io-console (0.8.0) - irb (1.15.1) + irb (1.15.2) pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.10.1) + json (2.12.0) jwt (2.10.1) base64 - kamal (2.5.2) + kamal (2.6.0) activesupport (>= 7.0) base64 (~> 0.2) bcrypt_pbkdf (~> 1.0) concurrent-ruby (~> 1.2) dotenv (~> 3.1) - ed25519 (~> 1.2) + ed25519 (~> 1.4) net-ssh (~> 7.3) sshkit (>= 1.23.0, < 2.0) thor (~> 1.3) zeitwerk (>= 2.6.18, < 3.0) - language_server-protocol (3.17.0.4) + language_server-protocol (3.17.0.5) lint_roller (1.1.0) - logger (1.6.6) - loofah (2.24.0) + logger (1.7.0) + loofah (2.24.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -136,10 +131,10 @@ GEM net-smtp marcel (1.0.4) mini_mime (1.1.5) - minitest (5.25.4) + minitest (5.25.5) msgpack (1.8.0) mysql2 (0.5.6) - net-imap (0.5.6) + net-imap (0.5.8) date net-protocol net-pop (0.1.2) @@ -154,41 +149,41 @@ GEM net-protocol net-ssh (7.3.0) nio4r (2.7.4) - nokogiri (1.18.3-aarch64-linux-gnu) + nokogiri (1.18.8-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.3-aarch64-linux-musl) + nokogiri (1.18.8-aarch64-linux-musl) racc (~> 1.4) - nokogiri (1.18.3-arm-linux-gnu) + nokogiri (1.18.8-arm-linux-gnu) racc (~> 1.4) - nokogiri (1.18.3-arm-linux-musl) + nokogiri (1.18.8-arm-linux-musl) racc (~> 1.4) - nokogiri (1.18.3-arm64-darwin) + nokogiri (1.18.8-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.3-x86_64-darwin) + nokogiri (1.18.8-x86_64-darwin) racc (~> 1.4) - nokogiri (1.18.3-x86_64-linux-gnu) + nokogiri (1.18.8-x86_64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.3-x86_64-linux-musl) + nokogiri (1.18.8-x86_64-linux-musl) racc (~> 1.4) ostruct (0.6.1) - parallel (1.26.3) - parser (3.3.7.1) + parallel (1.27.0) + parser (3.3.8.0) ast (~> 2.4.1) racc pp (0.6.2) prettyprint prettyprint (0.2.0) - psych (5.2.3) + prism (1.4.0) + psych (5.2.6) date stringio puma (6.6.0) nio4r (~> 2.0) - raabro (1.4.0) racc (1.8.1) - rack (3.1.10) + rack (3.1.14) rack-cors (2.0.2) rack (>= 2.0.0) - rack-session (2.1.0) + rack-session (2.1.1) base64 (>= 0.1.0) rack (>= 3.0.0) rack-test (2.2.0) @@ -226,12 +221,12 @@ GEM zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) - rdoc (6.12.0) + rdoc (6.13.1) psych (>= 4.0.0) regexp_parser (2.10.0) - reline (0.6.0) + reline (0.6.1) io-console (~> 0.5) - rubocop (1.72.2) + rubocop (1.75.6) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -239,20 +234,21 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.38.0, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.38.0) - parser (>= 3.3.1.0) - rubocop-performance (1.24.0) + rubocop-ast (1.44.1) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-performance (1.25.0) lint_roller (~> 1.1) - rubocop (>= 1.72.1, < 2.0) + rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) - rubocop-rails (2.30.2) + rubocop-rails (2.31.0) activesupport (>= 4.2.0) lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.72.1, < 2.0) + rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) rubocop-rails-omakase (1.1.0) rubocop (>= 1.72) @@ -260,24 +256,9 @@ GEM rubocop-rails (>= 2.30) ruby-progressbar (1.13.0) securerandom (0.4.1) - solid_cable (3.0.7) - actioncable (>= 7.2) - activejob (>= 7.2) - activerecord (>= 7.2) - railties (>= 7.2) - solid_cache (1.0.7) - activejob (>= 7.2) - activerecord (>= 7.2) - railties (>= 7.2) - solid_queue (1.1.3) - activejob (>= 7.1) - activerecord (>= 7.1) - concurrent-ruby (>= 1.3.1) - fugit (~> 1.11.0) - railties (>= 7.1) - thor (~> 1.3.1) - sprockets (4.2.1) + sprockets (4.2.2) concurrent-ruby (~> 1.0) + logger rack (>= 2.2.4, < 4) sprockets-rails (3.5.2) actionpack (>= 6.1) @@ -298,20 +279,20 @@ GEM net-sftp (>= 2.1.2) net-ssh (>= 2.8.0) ostruct - stringio (3.1.5) + stringio (3.1.7) thor (1.3.2) - thruster (0.1.11) - thruster (0.1.11-aarch64-linux) - thruster (0.1.11-arm64-darwin) - thruster (0.1.11-x86_64-darwin) - thruster (0.1.11-x86_64-linux) + thruster (0.1.13) + thruster (0.1.13-aarch64-linux) + thruster (0.1.13-arm64-darwin) + thruster (0.1.13-x86_64-darwin) + thruster (0.1.13-x86_64-linux) timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) - uri (1.0.2) + uri (1.0.3) useragent (0.16.11) websocket-driver (0.7.7) base64 @@ -342,9 +323,6 @@ DEPENDENCIES rack-cors rails (~> 8.0.2) rubocop-rails-omakase - solid_cable - solid_cache - solid_queue sprockets-rails sqlite3 (>= 2.1) thruster diff --git a/backend/config/cable.yml b/backend/config/cable.yml index b9adc5a..442c092 100644 --- a/backend/config/cable.yml +++ b/backend/config/cable.yml @@ -9,9 +9,11 @@ test: adapter: test production: - adapter: solid_cable - connects_to: - database: - writing: cable - polling_interval: 0.1.seconds - message_retention: 1.day + # adapter: solid_cable + adapter: async + disable_request_forgery_protection: true + # connects_to: + # database: + # writing: cable + # polling_interval: 0.1.seconds + # message_retention: 1.day diff --git a/backend/config/environments/production.rb b/backend/config/environments/production.rb index 54afe94..f49bf44 100644 --- a/backend/config/environments/production.rb +++ b/backend/config/environments/production.rb @@ -44,11 +44,11 @@ Rails.application.configure do config.active_support.report_deprecations = false # Replace the default in-process memory cache store with a durable alternative. - config.cache_store = :solid_cache_store + # config.cache_store = :solid_cache_store # Replace the default in-process and non-durable queuing backend for Active Job. - config.active_job.queue_adapter = :solid_queue - config.solid_queue.connects_to = { database: { writing: :queue } } + # config.active_job.queue_adapter = :solid_queue + # config.solid_queue.connects_to = { database: { writing: :queue } } # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. diff --git a/backend/config/puma.rb b/backend/config/puma.rb index a248513..16286a8 100644 --- a/backend/config/puma.rb +++ b/backend/config/puma.rb @@ -28,13 +28,13 @@ threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) threads threads_count, threads_count # Specifies the `port` that Puma will listen on to receive requests; default is 3000. -port ENV.fetch("PORT", 3000) +port ENV.fetch("PORT", 3002) # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart # Run the Solid Queue supervisor inside of Puma for single-server deployments -plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"] +# plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"] # Specify the PID file. Defaults to tmp/pids/server.pid in development. # In other environments, only set the PID file if requested.