зеркало из https://github.com/github/octobox.git
Remove memcached dependency
This commit is contained in:
Родитель
49467315b5
Коммит
84f8ca8a0e
3
Gemfile
3
Gemfile
|
@ -3,9 +3,6 @@ ruby '2.4.0'
|
|||
|
||||
gem 'rails', '5.0.1'
|
||||
gem 'bootstrap-sass'
|
||||
gem 'dalli'
|
||||
gem 'faraday-http-cache'
|
||||
gem 'faraday_middleware'
|
||||
gem 'jquery-rails'
|
||||
gem 'kaminari'
|
||||
gem 'local_time', git: 'https://github.com/twalpole/local_time', branch: 'turbolinks5'
|
||||
|
|
|
@ -69,7 +69,6 @@ GEM
|
|||
concurrent-ruby (1.0.4)
|
||||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
dalli (2.7.6)
|
||||
debug_inspector (0.0.2)
|
||||
docile (1.1.5)
|
||||
dotenv (2.1.1)
|
||||
|
@ -84,10 +83,6 @@ GEM
|
|||
activesupport (>= 3.0.0)
|
||||
faraday (0.10.1)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
faraday-http-cache (2.0.0)
|
||||
faraday (~> 0.8)
|
||||
faraday_middleware (0.10.1)
|
||||
faraday (>= 0.7.4, < 1.0)
|
||||
ffi (1.9.14)
|
||||
globalid (0.3.7)
|
||||
activesupport (>= 4.1.0)
|
||||
|
@ -260,11 +255,8 @@ DEPENDENCIES
|
|||
bugsnag
|
||||
byebug
|
||||
codeclimate-test-reporter
|
||||
dalli
|
||||
dotenv-rails
|
||||
factory_girl
|
||||
faraday-http-cache
|
||||
faraday_middleware
|
||||
jquery-rails
|
||||
kaminari
|
||||
listen (~> 3.0.5)
|
||||
|
|
1
app.json
1
app.json
|
@ -21,7 +21,6 @@
|
|||
},
|
||||
"addons": [
|
||||
"heroku-postgresql",
|
||||
"memcachedcloud",
|
||||
"scheduler"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -49,25 +49,6 @@ Rails.application.configure do
|
|||
# Prepend all log lines with the following tags.
|
||||
config.log_tags = [ :request_id ]
|
||||
|
||||
# Use a different cache store in production.
|
||||
memcachedcloud_servers = ENV.fetch('MEMCACHEDCLOUD_SERVERS', '').split(',')
|
||||
if memcachedcloud_servers.any?
|
||||
|
||||
dalli_store_name_and_password = {
|
||||
username: ENV['MEMCACHEDCLOUD_USERNAME'],
|
||||
password: ENV['MEMCACHEDCLOUD_PASSWORD']
|
||||
}
|
||||
|
||||
dalli_store_config = {
|
||||
namespace: 'OCTOBOX',
|
||||
expires_in: (ENV['REQUEST_CACHE_TIMEOUT'] || 30).to_i.minutes
|
||||
}
|
||||
|
||||
config.cache_store = :dalli_store,
|
||||
memcachedcloud_servers,
|
||||
dalli_store_name_and_password.merge(dalli_store_config)
|
||||
end
|
||||
|
||||
# Use a real queuing backend for Active Job (and separate queues per environment)
|
||||
# config.active_job.queue_adapter = :resque
|
||||
# config.active_job.queue_name_prefix = "octobox_#{Rails.env}"
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'typhoeus/adapters/faraday'
|
||||
|
||||
Octokit.middleware = Faraday::RackBuilder.new do |builder|
|
||||
builder.use :http_cache, store: Rails.cache, logger: Rails.logger, shared_cache: false, serializer: Marshal
|
||||
builder.use Octokit::Middleware::FollowRedirects
|
||||
builder.use Octokit::Response::RaiseError
|
||||
builder.use Octokit::Response::FeedParser
|
||||
builder.use FaradayMiddleware::Gzip
|
||||
builder.request :retry
|
||||
builder.adapter :typhoeus
|
||||
end
|
||||
|
||||
Octokit.configure do |c|
|
||||
c.api_endpoint = Octobox.github_api_prefix
|
||||
c.web_endpoint = Octobox.github_domain
|
||||
|
|
|
@ -5,8 +5,6 @@ services:
|
|||
image: postgres:9.6
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=development
|
||||
memcached:
|
||||
image: memcached
|
||||
app:
|
||||
image: octobox
|
||||
build:
|
||||
|
@ -16,7 +14,6 @@ services:
|
|||
- 3000:3000
|
||||
links:
|
||||
- database:database.service.octobox.internal
|
||||
- memcached:memcached.service.octobox.internal
|
||||
environment:
|
||||
- RAILS_ENV=development
|
||||
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
|
||||
|
@ -25,5 +22,4 @@ services:
|
|||
- OCTOBOX_DATABASE_USER=postgres
|
||||
- OCTOBOX_DATABASE_PASSWORD=development
|
||||
- OCTOBOX_DATABASE_HOST=database.service.octobox.internal
|
||||
- MEMCACHEDCLOUD_SERVERS=memcached.service.octobox.internal
|
||||
command: bin/docker-start
|
||||
|
|
Загрузка…
Ссылка в новой задаче