0.0.2 • Published 10 years ago
deploynode v0.0.2
deploynode
A fast way to setup a deploy system on an Amazon Linux EC2 instance.
Setting up a new instance
In the EC2 console create a new Amazon Linux instance. For this example, the instance will be called api.servername.com. Make sure you have SSH access to it.
On your development computer, run the following commands in a GitHub repository.
npm install --save-dev deploynode
deploynode init api.servername.com [github_username]
If not supplied, github_username
will default to the owner of the current repo, as specified in the package.json repository url property.
(Note: if ./node_modules/.bin
is not in your path then you'll have to type ./node_modules/bin/deploynode
instead, or install it globally using sudo npm install -g deploynode
).
Commands:
- init: Install the current directory's node package on the server.
- push: Update the code on the server.
- start: Start a process which runs
npm start
on the server.
How it works
What it does to a remote server:
- Installs git using yum
- Installs Node.js using yum
- Creates a
deploy
key if it doesn't already exist - Grants read/write access to the GitHub repository for the new
deploy
key. Clones the repo.