Commit 9888b4ce authored by Achilleas Pipinellis's avatar Achilleas Pipinellis Committed by Jonne Haß

Add option to set a pid file for unicorn in diaspora.yml

http://unicorn.bogomips.org/Unicorn/Configurator.html#method-i-pid

closes #6411
parent 92113749
......@@ -9,6 +9,7 @@
* Add new moderator role. Moderators can view and act on reported posts [#6351](https://github.com/diaspora/diaspora/pull/6351)
* Only post to the primary tumblr blog [#6386](https://github.com/diaspora/diaspora/pull/6386)
* Always show public photos on profile page [#6398](https://github.com/diaspora/diaspora/pull/6398)
* Expose Unicorn's pid option to our configuration system [#6411](https://github.com/diaspora/diaspora/pull/6411)
# 0.5.3.1
......
......@@ -42,6 +42,7 @@ defaults:
port:
listen: '0.0.0.0:3000'
rails_environment: 'development'
pid:
stderr_log:
stdout_log:
unicorn_worker: 2
......
......@@ -171,6 +171,9 @@ configuration: ## Section
## Note: this setting is deprecated, use listen instead.
#port: 3000
## Set the path for the PID file of the unicorn master process (default=none)
#pid: '/run/diaspora/diaspora.pid'
## Rails environment (default='development').
## The environment in which the server should be started by default.
## Change this to 'production' if you wish to run a production environment.
......
......@@ -4,6 +4,7 @@ port = ENV["PORT"]
port = port && !port.empty? ? port.to_i : nil
listen port || AppConfig.server.listen.get unless RACKUP[:set_listener]
pid AppConfig.server.pid.get if AppConfig.server.pid?
worker_processes AppConfig.server.unicorn_worker.to_i
timeout AppConfig.server.unicorn_timeout.to_i
stderr_path AppConfig.server.stderr_log.get if AppConfig.server.stderr_log?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment