lib/capistrano/node-deploy.rb in capistrano-node-deploy-1.0.4 vs lib/capistrano/node-deploy.rb in capistrano-node-deploy-1.0.5
- old
+ new
@@ -4,17 +4,17 @@
UPSTART_TEMPLATE = <<EOD
#!upstart
description "{{application}} node app"
author "capistrano"
-start on startup
+start on (filesystem and net-device-up IFACE=lo)
stop on shutdown
respawn
respawn limit 99 5
script
- exec sudo -u {{user}} {{node_binary}} {{current_path}}/{{app_command}} 2>&1 >> {{shared_path}}/{{application}}.log
+ exec sudo -u {{user}} NODE_ENV=production {{node_binary}} {{current_path}}/{{app_command}} 2>&1 >> {{shared_path}}/{{application}}.log
end script
EOD
def remote_file_exists?(full_path)
'true' == capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip
\ No newline at end of file