Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
diaspora
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Milan
diaspora
Commits
2a2efd09
Commit
2a2efd09
authored
Jan 15, 2012
by
Daniel Grippi
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2663 from torrancew/with_unicorn
Needz moar unicorns please [ci skip]
parents
78978f05
fe72e9d4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
2 deletions
+55
-2
Gemfile
Gemfile
+2
-1
Gemfile.lock
Gemfile.lock
+7
-0
Procfile
Procfile
+1
-1
config/unicorn.rb
config/unicorn.rb
+45
-0
No files found.
Gemfile
View file @
2a2efd09
...
...
@@ -6,7 +6,8 @@ gem 'bundler', '>= 1.0.0'
gem
'
foreman
'
,
'0.27.0'
gem
'
whenever
'
gem
'
thin
'
,
'~> 1.3.1'
,
:require
=>
false
gem
'
thin
'
,
'~> 1.3.1'
,
:require
=>
false
gem
'
unicorn
'
,
'~> 4.1.1'
,
:require
=>
false
# authentication
...
...
Gemfile.lock
View file @
2a2efd09
...
...
@@ -218,6 +218,7 @@ GEM
multi_json
jwt (0.1.4)
json (>= 1.2.4)
kgio (2.7.0)
launchy (2.0.3)
linecache (0.46)
rbx-require-relative (> 0.0.4)
...
...
@@ -307,6 +308,7 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.4)
raindrops (0.8.0)
rake (0.9.2.2)
rbx-require-relative (0.0.5)
rdoc (3.12)
...
...
@@ -391,6 +393,10 @@ GEM
typhoeus (0.3.3)
mime-types
tzinfo (0.3.31)
unicorn (4.1.1)
kgio (~> 2.4)
rack
raindrops (~> 0.6)
vegas (0.1.8)
rack (>= 1.0.0)
warden (1.0.6)
...
...
@@ -490,6 +496,7 @@ DEPENDENCIES
timecop
twitter (= 2.0.2)
typhoeus
unicorn (~> 4.1.1)
vanna!
webmock
whenever
...
...
Procfile
View file @
2a2efd09
web: bundle exec
rails s thin
-p $PORT
web: bundle exec
unicorn -c config/unicorn.rb
-p $PORT
redis: redis-server
worker: QUEUE=* bundle exec rake resque:work
config/unicorn.rb
0 → 100644
View file @
2a2efd09
rails_env
=
ENV
[
'RAILS_ENV'
]
||
'development'
# Enable and set these to run the worker as a different user/group
#user = 'diaspora'
#group = 'diaspora'
worker_processes
3
## Load the app before spawning workers
#preload_app true
# How long to wait before killing an unresponsive worker
timeout
30
#pid '/var/run/diaspora/diaspora.pid'
#listen '/var/run/diaspora/diaspora.sock', :backlog => 2048
# Ruby Enterprise Feature
if
GC
.
respond_to?
(
:copy_on_write_friendly
=
)
GC
.
copy_on_write_friendly
=
true
end
before_fork
do
|
server
,
worker
|
# If using preload_app, enable this line
#ActiveRecord::Base.disconnect!
old_pid
=
'/var/run/diaspora/diaspora.pid.oldbin'
if
File
.
exists?
(
old_pid
)
&&
server
.
pid
!=
old_pid
begin
Process
.
kill
(
"QUIT"
,
File
.
read
(
old_pid
).
to_i
)
rescue
Errno
::
ENOENT
,
Errno
::
ESRCH
# someone else did our job for us
end
end
end
after_fork
do
|
server
,
worker
|
# If using preload_app, enable this line
#ActiveRecord::Base.establish_connection
# Enable this line to have the workers run as different user/group
#worker.user(user, group)
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment