Created
November 15, 2012 23:38
-
-
Save nelsonenzo/4082407 to your computer and use it in GitHub Desktop.
cap deploy script to for node.js
This file contains hidden or 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
require 'capistrano/node-deploy' | |
set :application, "cloud-search" | |
set :user, "deploy" | |
set :scm, :git | |
set :scm_username, "deploy" | |
set :repository, "[email protected]:onelogin/search.git" | |
# role :web, "10.0.1.76" # Your HTTP server, Apache/etc | |
role :app, "10.0.1.76" # This may be the same as your `Web` server | |
# role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run | |
# role :db, "your slave db-server here" | |
# if you want to clean up old releases on each deploy uncomment this: | |
# after "deploy:restart", "deploy:cleanup" | |
# if you're still using the script/reaper helper you will need | |
# these http://github.com/rails/irs_process_scripts | |
# If you are using Passenger mod_rails uncomment this: | |
# namespace :deploy do | |
# task :start do ; end | |
# task :stop do ; end | |
# task :restart, :roles => :app, :except => { :no_release => true } do | |
# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" | |
# end | |
# end | |
set :deploy_to, "/srv/cloudsearch" | |
# Overriding Default Settings | |
# Set app command to run (defaults to index.js, or your `main` file from `package.json`) | |
set :app_command, "app.js" | |
# Set additional environment variables for the app | |
# set :app_environment, "PORT=8080" | |
# Set node binary to run (defaults to /usr/bin/node) | |
# set :node_binary, "/usr/bin/coffee" | |
# Set node environment (defaults to production) | |
set :node_env, "development" | |
# Set the user to run node as (defaults to deploy) | |
set :node_user, "deploy" | |
# Set the name of the upstart command (defaults to #{application}-#{node_env}) | |
# set :upstart_job_name, "myserver" |
This file contains hidden or 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
# A sample Gemfile | |
source "https://rubygems.org" | |
gem "capistrano" | |
gem "capistrano-node-deploy" |
This file contains hidden or 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
{ | |
"name" : "barebones", | |
"version" : "1.1.59" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment