Skip to content

Commit

Permalink
Add option to set a pid file for unicorn in diaspora.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
axilleas authored and jhass committed Sep 19, 2015
1 parent 9211374 commit 9888b4c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions config/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ defaults:
port:
listen: '0.0.0.0:3000'
rails_environment: 'development'
pid:
stderr_log:
stdout_log:
unicorn_worker: 2
Expand Down
3 changes: 3 additions & 0 deletions config/diaspora.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions config/unicorn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
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?
Expand Down

0 comments on commit 9888b4c

Please sign in to comment.