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:
danielgrippi 2011-08-29 14:36:19 -07:00
parent 4d666e3f5b
commit 1198670383
6 changed files with 12 additions and 6 deletions

View file

@ -14,6 +14,8 @@ gem 'ohai', '0.5.8', :require => false #Chef dependency
gem 'nokogiri'
gem 'settingslogic', '2.0.6'
gem 'foreman'
gem 'vanna', :git => "git://github.com/MikeSofaer/vanna.git"
#Security

View file

@ -200,6 +200,9 @@ GEM
nokogiri (~> 1.4.3.1)
ruby-hmac
foreigner (0.9.1)
foreman (0.20.0)
term-ansicolor (~> 1.0.5)
thor (>= 0.13.6)
formatador (0.2.0)
fuubar (0.0.6)
rspec (~> 2.0)
@ -481,6 +484,7 @@ DEPENDENCIES
fixture_builder (= 0.2.2)
fog (= 0.3.25)
foreigner (= 0.9.1)
foreman
fuubar
haml (= 3.1.2)
hoptoad_notifier

4
Procfile Normal file
View 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

View file

@ -2,7 +2,7 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
-if AppConfig[:single_process_mode]
-if ENV['SINGLE_PROCESS']
:javascript
var websocket_enabled = false
- else

View file

@ -133,9 +133,6 @@ defaults: &defaults
#s3_bucket: 'my_photos'
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
paypal_hosted_button_id: ""
@ -154,7 +151,6 @@ development:
production:
<<: *defaults
single_process_mode: false
# Setting the root certificate bundle (this is operating system specific). Defaults:
# CentOS: '/etc/pki/tls/certs/ca-bundle.crt'

View file

@ -1,7 +1,7 @@
require 'resque'
begin
if AppConfig[:single_process_mode]
if ENV['SINGLE_PROCESS']
if Rails.env == 'production'
puts "WARNING: You are running Diaspora in production without Resque workers turned on. Please don't do this."
end