-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from BenoitHiller/systemd
add preliminary systemd support
- Loading branch information
Showing
6 changed files
with
66 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
lib/generators/capistrano/unicorn_nginx/templates/unicorn_service.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<% command = bundle_unicorn("-D -c", fetch(:unicorn_config), "-E", fetch(:unicorn_app_env)) %> | ||
[Unit] | ||
Description=Unicorn Server | ||
Wants=mysqld.service nginx.service postgresql.service | ||
After=redis.service mysqld.service postgresql.service | ||
|
||
[Service] | ||
User=<%= fetch(:unicorn_user) %> | ||
WorkingDirectory=<%= current_path %> | ||
Environment=RAILS_ENV=<%= fetch(:unicorn_app_env) %> | ||
<% command.environment_hash.each_pair do |key, value| %> | ||
Environment=<%= key %>=<%= value %> | ||
<% end %> | ||
SyslogIdentifier=unicorn | ||
PIDFile=<%= fetch(:unicorn_pid) %> | ||
|
||
ExecStart=<%= command.to_s %> | ||
|
||
[Install] | ||
WantedBy=multi-user.target |