Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
cs_comments_service
Commits
865080c5
Commit
865080c5
authored
Mar 10, 2014
by
Carson Gee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding additional config for production tcp listener
parent
64c08fb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
config/unicorn_tcp.rb
+25
-0
No files found.
config/unicorn_tcp.rb
0 → 100644
View file @
865080c5
require
'tmpdir'
worker_processes
Integer
(
ENV
[
'WORKER_PROCESSES'
]
||
4
)
timeout
25
preload_app
true
listen_host
=
ENV
[
'LISTEN_HOST'
]
||
'0.0.0.0'
listen_port
=
ENV
[
'LISTEN_PORT'
]
||
'4567'
listen
"
#{
listen_host
}
:
#{
listen_port
}
"
,
:tcp_nopush
=>
true
data_dir
=
ENV
[
'DATA_DIR'
]
||
Dir
.
tmpdir
pid
"
#{
data_dir
}
/forum_unicorn.pid"
before_fork
do
|
server
,
worker
|
Signal
.
trap
'TERM'
do
puts
'Unicorn master intercepting TERM and sending myself QUIT instead'
Process
.
kill
'QUIT'
,
Process
.
pid
end
end
after_fork
do
|
server
,
worker
|
Signal
.
trap
'TERM'
do
puts
'Unicorn worker intercepting TERM and doing nothing. Waiting for master to send QUIT'
end
::
Mongoid
.
default_session
.
disconnect
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