Added Foreman gem. Run Diaspora using foreman start (will start everything except mySQL. Passing in a -p flag will let you specifiy the port. Also: I took single_process_mode out of app config and made it an environment variable. If you want to boot a lightweight server, run SINGLE_PROCESS=true rails s.
This commit is contained in:
parent
4d666e3f5b
commit
1198670383
6 changed files with 12 additions and 6 deletions
2
Gemfile
2
Gemfile
|
|
@ -14,6 +14,8 @@ gem 'ohai', '0.5.8', :require => false #Chef dependency
|
||||||
gem 'nokogiri'
|
gem 'nokogiri'
|
||||||
gem 'settingslogic', '2.0.6'
|
gem 'settingslogic', '2.0.6'
|
||||||
|
|
||||||
|
gem 'foreman'
|
||||||
|
|
||||||
gem 'vanna', :git => "git://github.com/MikeSofaer/vanna.git"
|
gem 'vanna', :git => "git://github.com/MikeSofaer/vanna.git"
|
||||||
|
|
||||||
#Security
|
#Security
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,9 @@ GEM
|
||||||
nokogiri (~> 1.4.3.1)
|
nokogiri (~> 1.4.3.1)
|
||||||
ruby-hmac
|
ruby-hmac
|
||||||
foreigner (0.9.1)
|
foreigner (0.9.1)
|
||||||
|
foreman (0.20.0)
|
||||||
|
term-ansicolor (~> 1.0.5)
|
||||||
|
thor (>= 0.13.6)
|
||||||
formatador (0.2.0)
|
formatador (0.2.0)
|
||||||
fuubar (0.0.6)
|
fuubar (0.0.6)
|
||||||
rspec (~> 2.0)
|
rspec (~> 2.0)
|
||||||
|
|
@ -481,6 +484,7 @@ DEPENDENCIES
|
||||||
fixture_builder (= 0.2.2)
|
fixture_builder (= 0.2.2)
|
||||||
fog (= 0.3.25)
|
fog (= 0.3.25)
|
||||||
foreigner (= 0.9.1)
|
foreigner (= 0.9.1)
|
||||||
|
foreman
|
||||||
fuubar
|
fuubar
|
||||||
haml (= 3.1.2)
|
haml (= 3.1.2)
|
||||||
hoptoad_notifier
|
hoptoad_notifier
|
||||||
|
|
|
||||||
4
Procfile
Normal file
4
Procfile
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
redis: redis-server
|
||||||
|
websocket: ruby script/websocket_server.rb
|
||||||
|
web: bundle exec rails s thin -p $PORT
|
||||||
|
worker: QUEUE=* rake resque:work
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
-if AppConfig[:single_process_mode]
|
-if ENV['SINGLE_PROCESS']
|
||||||
:javascript
|
:javascript
|
||||||
var websocket_enabled = false
|
var websocket_enabled = false
|
||||||
- else
|
- else
|
||||||
|
|
|
||||||
|
|
@ -133,9 +133,6 @@ defaults: &defaults
|
||||||
#s3_bucket: 'my_photos'
|
#s3_bucket: 'my_photos'
|
||||||
s3_region: 'us-east-1'
|
s3_region: 'us-east-1'
|
||||||
|
|
||||||
# Set this to true if you want to do everything synchronously instead of using resque, our redis-backed queue system.
|
|
||||||
single_process_mode: true
|
|
||||||
|
|
||||||
# Use paypal for recurring donations
|
# Use paypal for recurring donations
|
||||||
paypal_hosted_button_id: ""
|
paypal_hosted_button_id: ""
|
||||||
|
|
||||||
|
|
@ -154,7 +151,6 @@ development:
|
||||||
|
|
||||||
production:
|
production:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
single_process_mode: false
|
|
||||||
|
|
||||||
# Setting the root certificate bundle (this is operating system specific). Defaults:
|
# Setting the root certificate bundle (this is operating system specific). Defaults:
|
||||||
# CentOS: '/etc/pki/tls/certs/ca-bundle.crt'
|
# CentOS: '/etc/pki/tls/certs/ca-bundle.crt'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
require 'resque'
|
require 'resque'
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if AppConfig[:single_process_mode]
|
if ENV['SINGLE_PROCESS']
|
||||||
if Rails.env == 'production'
|
if Rails.env == 'production'
|
||||||
puts "WARNING: You are running Diaspora in production without Resque workers turned on. Please don't do this."
|
puts "WARNING: You are running Diaspora in production without Resque workers turned on. Please don't do this."
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue