Permalink
Browse files

Set up foreman, sidekiq initializer and modifed sidekiq config.

  • Loading branch information...
1 parent aa37de4 commit 3df387bb83875c4255fb4ac7128f095a243e4d18 @Jellyfishboy committed Apr 19, 2016
Showing with 25 additions and 3 deletions.
  1. +4 −1 Gemfile
  2. +3 −0 Gemfile.lock
  3. +2 −1 Procfile
  4. +2 −0 Procfile.dev
  5. +7 −0 config/initializers/sidekiq.rb
  6. +7 −1 config/sidekiq.yml
View
@@ -114,4 +114,7 @@ gem 'bcrypt-ruby', '~> 3.0.0'
gem 'codacy-coverage', :require => false
# Colour console
-gem 'colorize'
+gem 'colorize'
+
+# server management
+gem 'foreman'
View
@@ -289,6 +289,8 @@ GEM
fog-xml (0.1.2)
fog-core
nokogiri (~> 1.5, >= 1.5.11)
+ foreman (0.78.0)
+ thor (~> 0.19.1)
formatador (0.2.5)
friendly_id (5.1.0)
activerecord (>= 4.0.0)
@@ -615,6 +617,7 @@ DEPENDENCIES
faker
fast_blank
fog
+ foreman
friendly_id
fuubar
gon
View
@@ -1 +1,2 @@
-web: bundle exec rails s -p 9000
+web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
+worker: bundle exec sidekiq -e production
View
@@ -0,0 +1,2 @@
+web: rails s
+worker: bundle exec sidekiq -C config/sidekiq.yml
@@ -0,0 +1,7 @@
+Sidekiq.configure_server do |config|
+ config.redis = { url: 'redis://localhost:6379/12' }
+end
+
+Sidekiq.configure_client do |config|
+ config.redis = { url: 'redis://localhost:6379/12' }
+end
View
@@ -1,7 +1,13 @@
---
-:concurrency: 25
+:concurrency: 5
:pidfile: ./tmp/pids/sidekiq.pid
:logfile: ./log/sidekiq.log
+:verbose: true
+staging:
+ :concurrency: 10
+production:
+ :concurrency: 20
+ :verbose: false
# Create two queues, defaut and high priority
# The 2 tells Sidekiq to check the associated queue twice as often
:queues:

0 comments on commit 3df387b

Please sign in to comment.