Skip to content

Commit

Permalink
add capistrano and redis cache
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeig committed Nov 25, 2024
1 parent 4c84055 commit 707e7bc
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 7 deletions.
8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ group :development do
gem "listen"
gem "rubocop"
gem "web-console"

gem "capistrano", "~> 3.19"
gem "capistrano-bundler"
gem "capistrano-passenger"
gem "capistrano-rails", "~> 1.6"
gem "capistrano-rails-console"
gem "capistrano-rbenv"
gem "capistrano-sidekiq"
end

group :production do
Expand Down
44 changes: 44 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ GEM
activesupport (>= 6.1)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
airbrussh (1.5.3)
sshkit (>= 1.6.1, != 1.7.0)
appsignal (4.2.0)
logger
rack
Expand Down Expand Up @@ -374,6 +376,28 @@ GEM
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.1.3)
capistrano (3.19.2)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (2.1.1)
capistrano (~> 3.1)
capistrano-passenger (0.2.1)
capistrano (~> 3.0)
capistrano-rails (1.6.3)
capistrano (~> 3.1)
capistrano-bundler (>= 1.1, < 3)
capistrano-rails-console (2.3.0)
capistrano (>= 3.5.0, < 4.0.0)
sshkit-interactive (~> 0.3.0)
capistrano-rbenv (2.2.0)
capistrano (~> 3.1)
sshkit (~> 1.3)
capistrano-sidekiq (2.3.1)
capistrano (>= 3.9.0)
capistrano-bundler
sidekiq (>= 6.0)
capybara (3.40.0)
addressable
matrix
Expand Down Expand Up @@ -641,8 +665,13 @@ GEM
net-protocol
net-protocol (0.2.2)
timeout
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-sftp (4.0.0)
net-ssh (>= 5.0.0, < 8.0.0)
net-smtp (0.3.4)
net-protocol
net-ssh (7.3.0)
nio4r (2.7.3)
node-runner (1.2.0)
nokogiri (1.16.7-aarch64-linux)
Expand Down Expand Up @@ -926,6 +955,14 @@ GEM
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
sshkit (1.23.2)
base64
net-scp (>= 1.1.2)
net-sftp (>= 2.1.2)
net-ssh (>= 2.8.0)
ostruct
sshkit-interactive (0.3.0)
sshkit (~> 1.12)
ssrf_filter (1.1.2)
stackprof (0.2.26)
statsd-ruby (1.5.0)
Expand Down Expand Up @@ -993,6 +1030,13 @@ DEPENDENCIES
barnes
bootsnap
byebug
capistrano (~> 3.19)
capistrano-bundler
capistrano-passenger
capistrano-rails (~> 1.6)
capistrano-rails-console
capistrano-rbenv
capistrano-sidekiq
codecov
dalli
database_cleaner
Expand Down
8 changes: 1 addition & 7 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
config.log_tags = [:request_id]

# Use a different cache store in production.
# config.cache_store = :mem_cache_store
config.cache_store = :redis_cache_store

# Use a real queuing backend for Active Job (and separate queues per environment).
config.active_job.queue_adapter = :sidekiq
Expand Down Expand Up @@ -145,12 +145,6 @@
}
end

if ENV["MEMCACHEDCLOUD_SERVERS"]
config.cache_store = :mem_cache_store, ENV["MEMCACHEDCLOUD_SERVERS"].split(","), {
username: ENV.fetch("MEMCACHEDCLOUD_USERNAME", nil), password: ENV.fetch("MEMCACHEDCLOUD_PASSWORD", nil)
}
end

config.lograge.enabled = true
config.lograge.formatter = Lograge::Formatters::Json.new
config.lograge.custom_options = lambda do |event|
Expand Down

0 comments on commit 707e7bc

Please sign in to comment.