0.2.6 • Published 9 years ago

deployme v0.2.6

Weekly downloads
4
License
GPL-2.0
Repository
github
Last release
9 years ago

deployme

An automated tool to deploy untracked files to servers (such as images) through the use of SFTP.

Installation

npm

The Node-package-manager (npm) is the recommended way to install deployme. To install via npm, run npm install deployme -g. The -g parameter specifies that the package should be installed globally, which is recommended for nearly every use case.

In addition, there are a few other varieties to installing via npm:

# install through this GitHub repository
npm install panchr/deployme -g

# Install directly through GitHub
npm install https://github.com/panchr/node-deployme.git -g

git

To install via git, run these commands in your terminal of choice:

git clone https://github.com/panchr/node-deployme.git
cd node-deployme

Now, you can directly access the CLI (Command Line Interface) by using ./bin/cli. Again, I highly recommend using npm instead.


Configuration

The CLI tool uses the default configuration file, .deploy-config. To generate a standard configuration file, run deployme init. This will generate the configuration file in the current directory.

Note: deployme will search for a .deploy-config file in any of the parent directories of the current working directory. So, it is possible to run the tool in any subdirectory of a project.

The configuration options are stored as standard JSON.

namedescriptiontypedefault value
hostThe host name of the serverString"localhost"
portPort to connect to the server withint22
usernameThe username to connect withString"root"
passwordThe password of the above userString""
localAn object of local configurationObject{}
local.rootThe local root of the files to syncString"."
local.directoriesThe local directories to syncArray[]
local.filesThe local files to sync (not supported yet)Array[]
remoteAn object of remote configurationObject{}
remote.rootThe remote root to sync toString"/"

For example, here is a sample configuration file:

{
	"host": "myserver.io",
	"port": 22,
	"username": "panchr",
	"password": "v3rys3cure",
	"local": {
		"root": "static",
		"directories": ["images", "icons"],
		"files": ["myfavicon.ico", "secure.js"]
	},
	"remote": {
		"root": "/var/www/site"
	}
}

Usage

deployme comes with a few useful commands:

init

This is the initialization script. To use it, run deployme init. It will walk you through the setup of the main configuration file, .deploy-config.

reset

Reset is very similar to init. In fact, it provides the same functionality but allows you to override previous options. It is invoked via deployme reset.

help

To get a list of commands and what they do, use deployme help.

diff

To see what the files that need to be synced, run deployme diff.

sync

Finally, deployme sync will calculate the required changes to be synced and then upload the appropriate files to the remote server.

local

deployme local provides a series of subcommands that allows you to configure the local settings of the syncer:

SubcommandArgumentDescriptionExample
rootpathSet the local root path to the file pathdeployme local root /static
addpathAdd a local path to be synceddeployme local add /test
addglob patternAdd matching local paths to be synceddeployme local add *.css
removepathRemove a local path from being synceddeployme local remove mystyle.css
removeglob patternRemove matching local paths from being synceddeployme local remove test/*

remote

deployme remote only provides one command so far, but more will be added soon. Each subcommand allows you to configure the remote settings of the syncer:

SubcommandArgumentDescriptionExample
rootfilepathSet the remote root path to "filepath"deployme remote root /var/www/static
0.2.6

9 years ago

0.2.5

9 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago