additional fixes for install script
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -57,6 +57,7 @@ gem 'dtext_rb', :git => "https://github.com/r888888888/dtext_rb.git", :require =
|
|||||||
gem 'google-api-client'
|
gem 'google-api-client'
|
||||||
gem 'cityhash'
|
gem 'cityhash'
|
||||||
gem 'bigquery', :git => "https://github.com/abronte/BigQuery.git", :ref => "b92b4e0b54574e3fde7ad910f39a67538ed387ad"
|
gem 'bigquery', :git => "https://github.com/abronte/BigQuery.git", :ref => "b92b4e0b54574e3fde7ad910f39a67538ed387ad"
|
||||||
|
gem 'memcache_mock'
|
||||||
|
|
||||||
# needed for looser jpeg header compat
|
# needed for looser jpeg header compat
|
||||||
gem 'ruby-imagespec', :require => "image_spec", :git => "https://github.com/r888888888/ruby-imagespec.git", :branch => "exif-fixes"
|
gem 'ruby-imagespec', :require => "image_spec", :git => "https://github.com/r888888888/ruby-imagespec.git", :branch => "exif-fixes"
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ GEM
|
|||||||
ntlm-http (~> 0.1, >= 0.1.1)
|
ntlm-http (~> 0.1, >= 0.1.1)
|
||||||
webrobots (>= 0.0.9, < 0.2)
|
webrobots (>= 0.0.9, < 0.2)
|
||||||
memcache-client (1.8.5)
|
memcache-client (1.8.5)
|
||||||
|
memcache_mock (0.0.14)
|
||||||
memoist (0.14.0)
|
memoist (0.14.0)
|
||||||
memoizable (0.4.2)
|
memoizable (0.4.2)
|
||||||
thread_safe (~> 0.3, >= 0.3.1)
|
thread_safe (~> 0.3, >= 0.3.1)
|
||||||
@@ -439,6 +440,7 @@ DEPENDENCIES
|
|||||||
kgio
|
kgio
|
||||||
mechanize
|
mechanize
|
||||||
memcache-client
|
memcache-client
|
||||||
|
memcache_mock
|
||||||
mocha
|
mocha
|
||||||
net-sftp
|
net-sftp
|
||||||
net-ssh
|
net-ssh
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export GITHUB_INSTALL_SCRIPTS=https://raw.githubusercontent.com/r888888888/danbo
|
|||||||
# Install packages
|
# Install packages
|
||||||
echo "* Installing packages..."
|
echo "* Installing packages..."
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get -y install build-essential automake libssl-dev libxml2-dev libxslt-dev ncurses-dev sudo libreadline-dev flex bison ragel memcached libmemcached-dev git curl libcurl4-openssl-dev imagemagick libmagickcore-dev libmagickwand-dev sendmail-bin sendmail postgresql postgresql-contrib libpq-dev postgresql-server-dev-all nginx ssh coreutils
|
apt-get -y install build-essential automake libssl-dev libxml2-dev libxslt-dev ncurses-dev sudo libreadline-dev flex bison ragel memcached libmemcached-dev git curl libcurl4-openssl-dev imagemagick libmagickcore-dev libmagickwand-dev sendmail-bin sendmail postgresql postgresql-contrib libpq-dev postgresql-server-dev-all nginx ssh coreutils ffmpeg mkvtoolnix
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "* Error installing packages; aborting"
|
echo "* Error installing packages; aborting"
|
||||||
@@ -132,6 +132,8 @@ echo "*"
|
|||||||
echo "* You can also run a server locally without having to deal with deploys"
|
echo "* You can also run a server locally without having to deal with deploys"
|
||||||
echo "* by running the following command:"
|
echo "* by running the following command:"
|
||||||
echo "*"
|
echo "*"
|
||||||
|
echo "* bundle install"
|
||||||
|
echo "* bundle exec rake db:create db:migrate"
|
||||||
echo "* bundle exec rails server"
|
echo "* bundle exec rails server"
|
||||||
echo "*"
|
echo "*"
|
||||||
echo "* This will start a web process running on port 3000 that you can"
|
echo "* This will start a web process running on port 3000 that you can"
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ module Danbooru
|
|||||||
|
|
||||||
# List of memcached servers
|
# List of memcached servers
|
||||||
def memcached_servers
|
def memcached_servers
|
||||||
%w(localhost:11211)
|
%w(127.0.0.1:11211)
|
||||||
end
|
end
|
||||||
|
|
||||||
# After a post receives this many comments, new comments will no longer bump the post in comment/index.
|
# After a post receives this many comments, new comments will no longer bump the post in comment/index.
|
||||||
|
|||||||
@@ -2,6 +2,21 @@ unless defined?(MEMCACHE)
|
|||||||
MEMCACHE = Dalli::Client.new(Danbooru.config.memcached_servers, :namespace => Danbooru.config.app_name.gsub(/[^A-Za-z0-9]/, "_"))
|
MEMCACHE = Dalli::Client.new(Danbooru.config.memcached_servers, :namespace => Danbooru.config.app_name.gsub(/[^A-Za-z0-9]/, "_"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
MEMCACHE.get("x")
|
||||||
|
rescue Dalli::RingError => e
|
||||||
|
puts "-" * 40
|
||||||
|
puts "WARNING! MEMCACHE SERVER NOT FOUND! You will experience performance degradation."
|
||||||
|
puts e.to_s
|
||||||
|
puts "-- BEGIN STACKTRACE --"
|
||||||
|
e.backtrace.each do |line|
|
||||||
|
puts line
|
||||||
|
end
|
||||||
|
puts "-- END STACKTRACE --"
|
||||||
|
puts "-" * 40
|
||||||
|
MEMCACHE = MemcacheMock.new
|
||||||
|
end
|
||||||
|
|
||||||
if Rails.env.production?
|
if Rails.env.production?
|
||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
config.cache_store = :dalli_store, Danbooru.config.memcached_servers
|
config.cache_store = :dalli_store, Danbooru.config.memcached_servers
|
||||||
|
|||||||
Reference in New Issue
Block a user