gitlab/unicorn.rb: First round of slaposification
[slapos.git] / software / gitlab / template / unicorn.rb.in
1 {{ autogenerated }}
2 # see:
3 # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/unicorn.rb.example
4 # https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/unicorn.rb.example.development
5 # https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/unicorn.rb.erb
6 # (last updated for omnibus-gitlab 8.2.3+ce.0-0-g8eda093)
7
8 {% from 'macrolib.cfg.in' import cfg with context %}
9
10 # What ports/sockets to listen on, and what options for them.
11 # we listen only on unix socket
12 listen "{{ unicorn.socket }}", :backlog => {{ cfg('unicorn_backlog_socket') }}
13 #listen "127.0.0.1:8888", :tcp_nopush => true
14
15 working_directory '{{ gitlab_work.location }}'
16
17 # What the timeout for killing busy workers is, in seconds
18 timeout {{ cfg('unicorn_worker_timeout') }}
19
20 # Whether the app should be pre-loaded
21 preload_app <%= @preload_app %>
22
23 # How many worker processes
24 worker_processes {{ cfg('unicorn_worker_processes') }}
25
26 <%- if @before_fork %>
27 # What to do before we fork a worker
28 before_fork do |server, worker|
29 <%= @before_fork %>
30 end
31
32 <%- end %>
33 <%- if @after_fork %>
34 # What to do after we fork a worker
35 after_fork do |server, worker|
36 <%= @after_fork %>
37 end
38
39 <%- end %>
40
41 # Where to drop a pidfile
42 pid '{{ directory.run }}/unicorn.pid'
43
44 # Where stderr gets logged
45 stderr_path '{{ unicorn.log }}/unicorn_stderr.log'
46
47 # Where stdout gets logged
48 stdout_path '{{ unicorn.log }}/unicorn_stdout.log'