• Stars
    star
    197
  • Rank 197,722 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 12 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Capistrano recipe for deploying node.js apps

capistrano-node-deploy

Capistrano recipe for deploying node.js apps.

Features

  • Provides cap deploy functionality for your node app
  • Installs node packages (yarn) during deploys, using a shared folder for speed
  • Automatically creates upstart scripts for your node apps
  • Provides tasks for starting (cap node:start) and stopping (cap node:stop) your node app

Usage

First install the gem:

sudo gem install capistrano-node-deploy

or add it to your Gemfile if you have one:

gem "capistrano-node-deploy"

Now add the following to your Capfile

require "capistrano/node-deploy"

Full Capfile Example

require "capistrano/node-deploy"

set :application, "my-node-app-name"
set :repository,  "[email protected]:/loopj/my-node-app-name"
set :user, "deploy"
set :scm, :git
set :deploy_to, "/var/apps/my-app-folder"

role :app, "myserver.com"

Overriding Default Settings

# Set app command to run (defaults to index.js, or your `main` file from `package.json`)
set :app_command, "my_server.coffee"

# 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, "staging"
    
# Set the user to run node as (defaults to deploy)
set :node_user, "james"

# Set the name of the upstart command (defaults to #{application}-#{node_env})
set :upstart_job_name, "myserver"

Contributing to capistrano-node-deploy

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2012 James Smith. See LICENSE.txt for further details.

More Repositories

1

jquery-tokeninput

jQuery plugin which allows your users to select multiple items from a predefined list
JavaScript
2,364
star
2

android-smart-image-view

Android ImageView replacement which allows image loading from URLs or contact address book, with caching
Java
1,295
star
3

short-stack

World's Smallest Nintendo Wii, using a trimmed motherboard and custom stacked PCBs
C
707
star
4

jquery-simple-slider

Unobtrusive numerical slider plugin for jQuery
JavaScript
194
star
5

node-sidekiq

Enqueue jobs to sidekiq from your node apps. Closely mirrors the official ruby sidekiq interface and supports job scheduling.
CoffeeScript
104
star
6

airbrake-android

Airbrake Notifier for Android
Java
56
star
7

proguard-gradle-example

Example app showing how to use proguard with gradle
Java
51
star
8

initials-avatar

Generate an avatar image from a user's initials, ideal for use as a meaningful gravatar fallback.
Ruby
43
star
9

commonjs-ansi-color

ANSI color terminal output module for CommonJS (including Node.js)
JavaScript
40
star
10

i2c-hal

Easily use sensors like accelerometers, gyroscopes & barometers in your Arduino, ESP8266, mbed, Particle & Raspberry Pi projects
C++
27
star
11

aa-recruiter-honeypot

A Honeypot Repo for Recruiters
24
star
12

commonjs-date-formatting

PHP style strftime date formatting for CommonJS apps.
JavaScript
16
star
13

opengl-racing-game

Simple OpenGL racing game I made back in 2001, just rediscovered the dusty zip file
C
15
star
14

node-simple-redis-queue

JavaScript
15
star
15

open-rts

A full implementation of the Somfy RTS protocol designed for creating your own remotes, receivers, repeaters, or bridges on embedded hardware
C
15
star
16

wii-power-strip

Slimline PCB to supply power to trimmed Wii motherboards
10
star
17

connect-url-rewrite

Connect/Express middleware for rewriting URLs using regular expressions (like mod_rewrite).
JavaScript
9
star
18

gitscore

gitscore - github reputation app
CSS
7
star
19

periphlex

Flex PCB breakout for Bluetooth, USB, GameCube controller ports on trimmed Wii motherboards
7
star
20

home-assistant-vantage

Home Assistant integration for Vantage InFusion home automation controllers.
Python
6
star
21

console.frog

A bad pun for your JavaScript console
JavaScript
6
star
22

tcpclient

Arduino-Style POSIX TCP Client
C++
6
star
23

aiovantage

Python library for interacting with and controlling Vantage InFusion home automation controllers.
Python
5
star
24

loopj.github.com

Github pages repo for loopj.com
HTML
4
star
25

wii-trim-pcb-footprints

KiCad PCB outlines for creating PCB "shields" for trimmed Wii projects and Wii portables.
4
star
26

connect-redis-sse

Connect/Express middleware for publishing Server-Sent Events (EventSource) using Redis pub/sub.
JavaScript
4
star
27

tax-calculator

Ruby
3
star
28

resque-delayable

Resque plugin adds method rdelay to objects. Methods called with rdelay are executed asynchronously by resque, allowing your code to continue.
Ruby
3
star
29

jquery-simple-modal

Simple, unobtrusive modal dialog launcher
CoffeeScript
2
star
30

mongo-profiler

CoffeeScript
2
star
31

particle-cli-boilerplate

Template repo for new Particle projects, allowing you to build apps on the command line
Makefile
2
star
32

wii-breakout

Wii motherboard breakout board for USB, Bluetooth, GameCube controllers, A/V, and RST
2
star
33

manifest-generator

A cache.manifest generator in ruby, for use in your HTML5 offline apps.
Ruby
2
star
34

jekyll_layouts

Jekyll layouts shared between my various github pages
HTML
1
star
35

buggy-app

Ruby
1
star
36

androidtest

Java
1
star
37

unicodecheckmark.com

HTML
1
star
38

aws-instance-explorer

A way to visually explore your AWS instances in the browser
JavaScript
1
star
39

wii-homebrew-minimal

Makefile
1
star
40

wii-2d

C
1
star
41

wii-daughterboard

1
star