Browse Source

#6 完了

#23
みてるぞ 2 months ago
parent
commit
7bd70c7d01
6 changed files with 71 additions and 85 deletions
  1. +6
    -0
      backend/.gitignore
  2. +3
    -3
      backend/Gemfile
  3. +49
    -71
      backend/Gemfile.lock
  4. +8
    -6
      backend/config/cable.yml
  5. +3
    -3
      backend/config/environments/production.rb
  6. +2
    -2
      backend/config/puma.rb

+ 6
- 0
backend/.gitignore View File

@@ -30,3 +30,9 @@


# Ignore master key for decrypting credentials and more. # Ignore master key for decrypting credentials and more.
/config/master.key /config/master.key

/config/credentials.yml.enc
/config/credentials/*
/config/database.yml

/config/credentials/production.key

+ 3
- 3
backend/Gemfile View File

@@ -16,9 +16,9 @@ gem "puma", ">= 5.0"
gem "tzinfo-data", platforms: %i[ windows jruby ] gem "tzinfo-data", platforms: %i[ windows jruby ]


# Use the database-backed adapters for Rails.cache, Active Job, and Action Cable # 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 # Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false gem "bootsnap", require: false


+ 49
- 71
backend/Gemfile.lock View File

@@ -72,61 +72,56 @@ GEM
securerandom (>= 0.3) securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5) tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1) uri (>= 0.13.1)
ast (2.4.2)
ast (2.4.3)
base64 (0.2.0) base64 (0.2.0)
bcrypt_pbkdf (1.1.1) bcrypt_pbkdf (1.1.1)
bcrypt_pbkdf (1.1.1-arm64-darwin) bcrypt_pbkdf (1.1.1-arm64-darwin)
bcrypt_pbkdf (1.1.1-x86_64-darwin) bcrypt_pbkdf (1.1.1-x86_64-darwin)
benchmark (0.4.0) benchmark (0.4.0)
bigdecimal (3.1.9) bigdecimal (3.1.9)
bootsnap (1.18.4)
bootsnap (1.18.6)
msgpack (~> 1.2) msgpack (~> 1.2)
brakeman (7.0.0)
brakeman (7.0.2)
racc racc
builder (3.3.0) builder (3.3.0)
concurrent-ruby (1.3.5) concurrent-ruby (1.3.5)
connection_pool (2.5.0)
connection_pool (2.5.3)
crass (1.0.6) crass (1.0.6)
date (3.4.1) date (3.4.1)
debug (1.10.0) debug (1.10.0)
irb (~> 1.10) irb (~> 1.10)
reline (>= 0.3.8) reline (>= 0.3.8)
dotenv (3.1.7)
dotenv (3.1.8)
drb (2.2.1) drb (2.2.1)
ed25519 (1.3.0)
ed25519 (1.4.0)
erubi (1.13.1) 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) globalid (1.2.1)
activesupport (>= 6.1) activesupport (>= 6.1)
i18n (1.14.7) i18n (1.14.7)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
io-console (0.8.0) io-console (0.8.0)
irb (1.15.1)
irb (1.15.2)
pp (>= 0.6.0) pp (>= 0.6.0)
rdoc (>= 4.0.0) rdoc (>= 4.0.0)
reline (>= 0.4.2) reline (>= 0.4.2)
json (2.10.1)
json (2.12.0)
jwt (2.10.1) jwt (2.10.1)
base64 base64
kamal (2.5.2)
kamal (2.6.0)
activesupport (>= 7.0) activesupport (>= 7.0)
base64 (~> 0.2) base64 (~> 0.2)
bcrypt_pbkdf (~> 1.0) bcrypt_pbkdf (~> 1.0)
concurrent-ruby (~> 1.2) concurrent-ruby (~> 1.2)
dotenv (~> 3.1) dotenv (~> 3.1)
ed25519 (~> 1.2)
ed25519 (~> 1.4)
net-ssh (~> 7.3) net-ssh (~> 7.3)
sshkit (>= 1.23.0, < 2.0) sshkit (>= 1.23.0, < 2.0)
thor (~> 1.3) thor (~> 1.3)
zeitwerk (>= 2.6.18, < 3.0) 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) 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) crass (~> 1.0.2)
nokogiri (>= 1.12.0) nokogiri (>= 1.12.0)
mail (2.8.1) mail (2.8.1)
@@ -136,10 +131,10 @@ GEM
net-smtp net-smtp
marcel (1.0.4) marcel (1.0.4)
mini_mime (1.1.5) mini_mime (1.1.5)
minitest (5.25.4)
minitest (5.25.5)
msgpack (1.8.0) msgpack (1.8.0)
mysql2 (0.5.6) mysql2 (0.5.6)
net-imap (0.5.6)
net-imap (0.5.8)
date date
net-protocol net-protocol
net-pop (0.1.2) net-pop (0.1.2)
@@ -154,41 +149,41 @@ GEM
net-protocol net-protocol
net-ssh (7.3.0) net-ssh (7.3.0)
nio4r (2.7.4) nio4r (2.7.4)
nokogiri (1.18.3-aarch64-linux-gnu)
nokogiri (1.18.8-aarch64-linux-gnu)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.18.3-aarch64-linux-musl)
nokogiri (1.18.8-aarch64-linux-musl)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.18.3-arm-linux-gnu)
nokogiri (1.18.8-arm-linux-gnu)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.18.3-arm-linux-musl)
nokogiri (1.18.8-arm-linux-musl)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.18.3-arm64-darwin)
nokogiri (1.18.8-arm64-darwin)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.18.3-x86_64-darwin)
nokogiri (1.18.8-x86_64-darwin)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.18.3-x86_64-linux-gnu)
nokogiri (1.18.8-x86_64-linux-gnu)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.18.3-x86_64-linux-musl)
nokogiri (1.18.8-x86_64-linux-musl)
racc (~> 1.4) racc (~> 1.4)
ostruct (0.6.1) 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) ast (~> 2.4.1)
racc racc
pp (0.6.2) pp (0.6.2)
prettyprint prettyprint
prettyprint (0.2.0) prettyprint (0.2.0)
psych (5.2.3)
prism (1.4.0)
psych (5.2.6)
date date
stringio stringio
puma (6.6.0) puma (6.6.0)
nio4r (~> 2.0) nio4r (~> 2.0)
raabro (1.4.0)
racc (1.8.1) racc (1.8.1)
rack (3.1.10)
rack (3.1.14)
rack-cors (2.0.2) rack-cors (2.0.2)
rack (>= 2.0.0) rack (>= 2.0.0)
rack-session (2.1.0)
rack-session (2.1.1)
base64 (>= 0.1.0) base64 (>= 0.1.0)
rack (>= 3.0.0) rack (>= 3.0.0)
rack-test (2.2.0) rack-test (2.2.0)
@@ -226,12 +221,12 @@ GEM
zeitwerk (~> 2.6) zeitwerk (~> 2.6)
rainbow (3.1.1) rainbow (3.1.1)
rake (13.2.1) rake (13.2.1)
rdoc (6.12.0)
rdoc (6.13.1)
psych (>= 4.0.0) psych (>= 4.0.0)
regexp_parser (2.10.0) regexp_parser (2.10.0)
reline (0.6.0)
reline (0.6.1)
io-console (~> 0.5) io-console (~> 0.5)
rubocop (1.72.2)
rubocop (1.75.6)
json (~> 2.3) json (~> 2.3)
language_server-protocol (~> 3.17.0.2) language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0) lint_roller (~> 1.1.0)
@@ -239,20 +234,21 @@ GEM
parser (>= 3.3.0.2) parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.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) ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0) 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) lint_roller (~> 1.1)
rubocop (>= 1.72.1, < 2.0)
rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0)
rubocop-rails (2.30.2)
rubocop-rails (2.31.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
lint_roller (~> 1.1) lint_roller (~> 1.1)
rack (>= 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-ast (>= 1.38.0, < 2.0)
rubocop-rails-omakase (1.1.0) rubocop-rails-omakase (1.1.0)
rubocop (>= 1.72) rubocop (>= 1.72)
@@ -260,24 +256,9 @@ GEM
rubocop-rails (>= 2.30) rubocop-rails (>= 2.30)
ruby-progressbar (1.13.0) ruby-progressbar (1.13.0)
securerandom (0.4.1) 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) concurrent-ruby (~> 1.0)
logger
rack (>= 2.2.4, < 4) rack (>= 2.2.4, < 4)
sprockets-rails (3.5.2) sprockets-rails (3.5.2)
actionpack (>= 6.1) actionpack (>= 6.1)
@@ -298,20 +279,20 @@ GEM
net-sftp (>= 2.1.2) net-sftp (>= 2.1.2)
net-ssh (>= 2.8.0) net-ssh (>= 2.8.0)
ostruct ostruct
stringio (3.1.5)
stringio (3.1.7)
thor (1.3.2) 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) timeout (0.4.3)
tzinfo (2.0.6) tzinfo (2.0.6)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
unicode-display_width (3.1.4) unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4) unicode-emoji (4.0.4)
uri (1.0.2)
uri (1.0.3)
useragent (0.16.11) useragent (0.16.11)
websocket-driver (0.7.7) websocket-driver (0.7.7)
base64 base64
@@ -342,9 +323,6 @@ DEPENDENCIES
rack-cors rack-cors
rails (~> 8.0.2) rails (~> 8.0.2)
rubocop-rails-omakase rubocop-rails-omakase
solid_cable
solid_cache
solid_queue
sprockets-rails sprockets-rails
sqlite3 (>= 2.1) sqlite3 (>= 2.1)
thruster thruster


+ 8
- 6
backend/config/cable.yml View File

@@ -9,9 +9,11 @@ test:
adapter: test adapter: test


production: 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

+ 3
- 3
backend/config/environments/production.rb View File

@@ -44,11 +44,11 @@ Rails.application.configure do
config.active_support.report_deprecations = false config.active_support.report_deprecations = false


# Replace the default in-process memory cache store with a durable alternative. # 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. # 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. # 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. # Set this to true and configure the email server for immediate delivery to raise delivery errors.


+ 2
- 2
backend/config/puma.rb View File

@@ -28,13 +28,13 @@ threads_count = ENV.fetch("RAILS_MAX_THREADS", 3)
threads threads_count, threads_count threads threads_count, threads_count


# Specifies the `port` that Puma will listen on to receive requests; default is 3000. # 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. # Allow puma to be restarted by `bin/rails restart` command.
plugin :tmp_restart plugin :tmp_restart


# Run the Solid Queue supervisor inside of Puma for single-server deployments # 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. # Specify the PID file. Defaults to tmp/pids/server.pid in development.
# In other environments, only set the PID file if requested. # In other environments, only set the PID file if requested.


Loading…
Cancel
Save