Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d415adc
commit 801c7df
Showing
5 changed files
with
36 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!upstart | ||
description "node.js application" | ||
|
||
start on startup | ||
stop on shutdown | ||
|
||
#Send KILL after 5 seconds | ||
kill timeout 5 | ||
respawn | ||
|
||
#script details | ||
script | ||
export HOME="/home/vagrant" | ||
NODE_ENV=production | ||
exec sudo -u vagrant NODE_ENV=production node $HOME/app/server.js 2>&1 >> /var/log/node.log | ||
end script | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
cookbook_file "/etc/init/mysite-nodejs.conf" do | ||
source "nodejs.conf" | ||
owner "root" | ||
group "root" | ||
mode 0644 | ||
end | ||
|
||
service "mysite-nodejs" do | ||
provider Chef::Provider::Service::Upstart | ||
enabled true | ||
running true | ||
supports :restart => true, :reload => true, :status => true | ||
action [:enable, :start] | ||
end | ||
|