Commit 956ea7f7d596d32e8a6076b85a9a010bdb154017
1 parent
7cb4a2aa
Exists in
master
and in
17 other branches
Import unicorn.rb.erb from chef-server
Path files/chef-server-cookbooks/chef-server/templates/default/unicorn.rb.erb Repo https://github.com/opscode/omnibus-chef-server.git Revision 6a11fd840045a7ae7961e5a37439371b7407f3e9
Showing
1 changed file
with
52 additions
and
0 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/templates/default/unicorn.rb.erb
0 → 100644
| @@ -0,0 +1,52 @@ | @@ -0,0 +1,52 @@ | ||
| 1 | +## | ||
| 2 | +# Unicorn config at <%= @name %> | ||
| 3 | +# Managed by Chef - Local Changes will be Nuked from Orbit (just to be sure) | ||
| 4 | +## | ||
| 5 | + | ||
| 6 | +# What ports/sockets to listen on, and what options for them. | ||
| 7 | +<%- @listen.each do |port, options| %> | ||
| 8 | +listen "<%= port %>", <%= options %> | ||
| 9 | +<%- end %> | ||
| 10 | + | ||
| 11 | +<%- if @working_directory %> | ||
| 12 | +working_directory '<%= @working_directory %>' | ||
| 13 | +<%- end %> | ||
| 14 | + | ||
| 15 | +# What the timeout for killing busy workers is, in seconds | ||
| 16 | +timeout <%= @worker_timeout %> | ||
| 17 | + | ||
| 18 | +# Whether the app should be pre-loaded | ||
| 19 | +preload_app <%= @preload_app %> | ||
| 20 | + | ||
| 21 | +# How many worker processes | ||
| 22 | +worker_processes <%= @worker_processes %> | ||
| 23 | + | ||
| 24 | +<%- if @before_fork %> | ||
| 25 | +# What to do before we fork a worker | ||
| 26 | +before_fork do |server, worker| | ||
| 27 | + <%= @before_fork %> | ||
| 28 | +end | ||
| 29 | + | ||
| 30 | +<%- end %> | ||
| 31 | +<%- if @after_fork %> | ||
| 32 | +# What to do after we fork a worker | ||
| 33 | +after_fork do |server, worker| | ||
| 34 | + <%= @after_fork %> | ||
| 35 | +end | ||
| 36 | + | ||
| 37 | +<%- end %> | ||
| 38 | +<%- if @pid %> | ||
| 39 | +# Where to drop a pidfile | ||
| 40 | +pid '<%= @pid %>' | ||
| 41 | + | ||
| 42 | +<%- end %> | ||
| 43 | +<%- if @stderr_path %> | ||
| 44 | +# Where stderr gets logged | ||
| 45 | +stderr_path '<%= @stderr_path %>' | ||
| 46 | + | ||
| 47 | +<%- end %> | ||
| 48 | +<%- if @stdout_path %> | ||
| 49 | +# Where stdout gets logged | ||
| 50 | +stdout_path '<%= @stdout_path %>' | ||
| 51 | + | ||
| 52 | +<%- end %> |